Problem understanding the shape of w

Here’s a historical thread with some explanation of what is happening when Prof Ng defines the weight matrices in DLS C1 Week 3.