Week 4 Getting your Matrix Dimension Right

Hi, there

In the lecture, it is mentioned that Z^{[1]} has a dimension of (3,1), I am confused about why is it the case?

Thanks a lot and have a great day!

He is just talking about the activation output for one input sample (vector). So it will be a column vector. Since there are 3 output neurons in layer 1, that makes it 3 x 1. The convention Prof Ng uses is that he writes lower case letters when he means a single example and capital letters when he means a matrix containing multiple samples. So it’s really z^{[1]} there.