Semi positive definiteness of square root of specific matrix product Let $X$, $Y$ be n-by-n real matrix and has the following relation
$Y \times Y = X^T \times X$
Is $Y$ always positive semi definite?
If yes, how can we show this property?
If no, under what assumption of $X$ will make $Y$ always positive semi definite?
 A: For $Y^2=X^TX$, the matrix $Y$ is not always positive semidefinite. The only condition that can be imposed on $X$ to make $Y$ positive semidefinite is that $X$ is the zero scalar, i.e. $n=1$ and $X=0$. In fact:


*

*If $X\not=0,\,Y^2=X^TX$ and $Y$ is positive semidefinite, then we also have $(-Y)^2=X^TX$ and $-Y$ is not positive semidefinite.

*If $X=0$ and $n>1$, then $Y^2=X^TX$ for $Y=e_1e_n^T$, where $e_i$ is the $i$-th vector in the canonical basis of $\mathbb{R}^n$.

A: No.  Consider $Y=-I$ and $X=I$.
However, given a real $n$-by-$n$ matrix $X$, the matrix $X^TX$ is positive semidefinite, and every positive semidefinie matrix has a unique positive semidefinite square root.
Let $A$ be a positive semidefinite real $n$-by-$n$ matrix.  This means that $A=A^T$ and $x^TAx\geq 0$ for all column vectors $x\in\mathbb R^n$.  By the spectral theorem, $A=\sum\limits_{k=1}^m \lambda_k P_k$, where $\{\lambda_k\}_{k=1}^m$ is the set of eigenvalues of $A$, each $P_k$ is a symmetric idempotent, $P_k^2=P_k=P^{T}$, the projection onto the eigenspace for the eigenvalue $\lambda_k$, and $P_kP_j=0$ for $k\neq j$.  Because $A$ is postitive semidefinite, $\lambda_k\geq 0$ for all $k$, hence each $\lambda_k$ has a nonnegative real square root $\sqrt{\lambda_k}$.  A positive semidefinite square root of $A$ is $\sqrt A=\sum\limits_{k=1}^m\sqrt{\lambda_k}P_k$.
With more work one can show that if $Y^2=A$ and $Y$ is positive semidefinite, then $Y=\sqrt{A}$; this is the uniqueness of positive semi-definite square roots.  But there are generally many other square roots if you do not add the condition of positive semidefiniteness.
