# Is w\[j\]k a column vector or row vector

**URL:** <https://community.deeplearning.ai/t/is-w-j-k-a-column-vector-or-row-vector/350715>\
**Category:** Neural Networks and Deep Learning\
**Tags:** coursera-platform\
**Created:** [June 5, 2023, 6:18pm UTC](https://community.deeplearning.ai/t/is-w-j-k-a-column-vector-or-row-vector/350715 "2023-06-05T18:18:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moein\_Ronasi](https://avatars.discourse-cdn.com/v4/letter/m/5f9b8f/32.png) [@Moein\_Ronasi](https://community.deeplearning.ai/u/Moein_Ronasi)\
**Post date:** [June 5, 2023, 6:18pm UTC](https://community.deeplearning.ai/t/is-w-j-k-a-column-vector-or-row-vector/350715/1 "2023-06-05T18:18:58Z")

</div>

imagin that we have 3 input features and a hidden layer with 4 nodes. W[1] would be a (4,3) matrix.  
Now W[1]k (k is a the subscript) is the W elements in each row of W[1] matrix, which represents weight values of each node in layer one. right?  
so why in the quiz for week 3, it is said that W[j]k is a column vector.  
"This should not be selected  
No. The vectors  
w[j]k are column vectors. "

---

<div class="post-metadata">

**Author:** ![paulinpaloalto](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/paulinpaloalto/32/187_2.png) [@paulinpaloalto](https://community.deeplearning.ai/u/paulinpaloalto)\
**Post date:** [June 5, 2023, 7:31pm UTC](https://community.deeplearning.ai/t/is-w-j-k-a-column-vector-or-row-vector/350715/2 "2023-06-05T19:31:21Z")

</div>

You’re right that the way they are asking this question is a little confusing, but it all depends on going back to the notation that Prof Ng uses. When he explained all this in the lectures, he writes the linear activation for each individual neuron in the same way he wrote it for Logistic Regression, with the weight vector as a column vector that he then transposes. When he puts them together in to the W matrix, he stacks the transposed column vectors as the rows of W. [Here’s a thread](https://community.deeplearning.ai/t/cant-understand-a-matrix/125234/2) which shows the relevant slide from the Week 3 lectures and explains this in more detail.
