Week 3 Vectorizing

in Week 3 video 3, Prof Ng vectorizes 4 ‘Z’ functions. While doing so he says the w matrix is (4,3). Could someone pls elaborate on this?

Here’s a thread on that topic.