Concept Flow - Broadcasting for distance matrices
Start with two arrays: A and B
Reshape arrays to add extra dimensions
Broadcast arrays to compatible shapes
Compute element-wise differences
Square differences and sum over last axis
Result: Distance matrix between points in A and B
We reshape arrays to add dimensions, then numpy broadcasts them to compute all pairwise distances without loops.