# Function of Feature Transformation using PCA

I completely understood the math behind PCA. I have a doubt here while calculating the function that will do the transformation. According to the book : Deep Learning by Ian Goodfellow, Yoshua Bengio and Aaron Courville :

But when we do Transformation, We go for T = XD instead of above. How both of these are similar. I am confused :(

In the book, $$x\in \mathbb{R}^{d\times 1}$$, but typically in code implementations/examples, $$X$$ is a data matrix with dimension $$n\times d$$, where each row is a data sample of dimension $$1\times d$$. Therefore, $$XD=\begin{bmatrix}x_1^T\\x_2^T\\\vdots \\ x_n^T\end{bmatrix}D=\begin{bmatrix}x_1^TD\\x_2^TD\\\vdots \\ x_n^TD\end{bmatrix}=\begin{bmatrix}f_1(x)^T\\f_2(x)^T\\\vdots\\f_n(x)^T\end{bmatrix}$$ In conclusion, it's the same thing transposed.