Finding equivalent equation for matrix from regression

16 Views Asked by At

In lecture on Bayesian estimators, we have while deriving some expectation this: $$ X^T - AXX^T - A = 0 $$ where $X$ is a $n \times p$ predictor matrix with rank $p$ and $A$ is $p \times n $ matrix such that : $$\beta = Ay + z$$ and $\beta \in \mathbb{R}^p$ and $y$ and $z$ are independent random variables with Gaussian probability distribution. From these two function, they are able to derive to: $$A = (X^TX + I_p)^{-1}X^T$$while I am only able to come up to: $$A = X^T(XX^T + I_p)^{-1}$$ What am I doing wrong? Or missing here? Not that $X^TX$ is symmetric matrix.