I can't find $P$, for vectors you can do $P = A(A^{T}A)^{-1}A^T$. But here its not working because matrices have dimensions that can't multiply or divide. help

I can't find $P$, for vectors you can do $P = A(A^{T}A)^{-1}A^T$. But here its not working because matrices have dimensions that can't multiply or divide. help

Copyright © 2021 JogjaFile Inc.
The dimensions of the matrices do match.
Matrix $A$ is 3x2, which matches with $(A^TA)^{-1}$, which is 2x2.
The result $A(A^TA)^{-1}$ is again 3x2.
When multiplying it with $A^T$, which is 2x3, you get a 3x3 matrix for $P$.