# Dimensions of Weight matrix - change from Week2 to Week3

**URL:** <https://community.deeplearning.ai/t/dimensions-of-weight-matrix-change-from-week2-to-week3/857207>\
**Category:** Neural Networks and Deep Learning\
**Tags:** week-module-3, coursera-platform\
**Created:** [July 22, 2025, 5:10am UTC](https://community.deeplearning.ai/t/dimensions-of-weight-matrix-change-from-week2-to-week3/857207 "2025-07-22T05:10:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RajuM](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/rajum/32/162218_2.png) [@RajuM](https://community.deeplearning.ai/u/RajuM)\
**Post date:** [July 22, 2025, 5:10am UTC](https://community.deeplearning.ai/t/dimensions-of-weight-matrix-change-from-week2-to-week3/857207/1 "2025-07-22T05:10:47Z")

</div>

Whole of week 2, the representation is the following.  
Y = (W^t) \* X + B

In week 3, while studying multi layer representation  
Z1 = (W1) \* X + B

The transpose of the (W) got eliminated. ie the dimensions of W would change from Week2 to Week3.

Is it deliberately done, or is there a reason.

- coursera-platform
- dl-ai-learning-platform

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [July 22, 2025, 5:12am UTC](https://community.deeplearning.ai/t/dimensions-of-weight-matrix-change-from-week2-to-week3/857207/2 "2025-07-22T05:12:45Z")

</div>

There is no standard for the orientation of the weight matrix. Both forms are used.

---

<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:** [July 22, 2025, 3:03pm UTC](https://community.deeplearning.ai/t/dimensions-of-weight-matrix-change-from-week2-to-week3/857207/3 "2025-07-22T15:03:34Z")

</div>

Yes, Professor Ng is in complete control here and he gets to decide how to represent everything. He uses the convention that any standalone vector is a column vector, which is why the weight vector w in Logistic Regression is an n\_x x 1 column vector. That then requires the transpose to get the dot product with X to work as intended.

But when we get to full neural networks, the weights at each layer become a 2D matrix and he chose to orient them so that the transpose is no longer required. He goes into detail about how everything is defined in the lectures in Week 3. [Here’s a thread](https://community.deeplearning.ai/t/cant-understand-a-matrix/125234/2) which discusses this in a bit more detail.
