Is $A^TBA$ positive definite if and only if $A$ is nonsingular and $B$ is positive definite I hope I'm not repeating a question, but I couldn't find one like this.
Is this a valid proof? It seems straight forward. If its not, where did I go wrong and do you have any suggestions?
Proof:
Firstly, define: $A,B\in\mathbb{R}^{n \times n}$ and $x,y\in\mathbb{R}^n$
(If) Suppose $B$ is positive definite and A is nonsingular. By definition for a vector $y\neq0$, $y^TBy>0$. Let $y = Ax$. Since $A$ is nonsingular, for all $y\neq0$, $x\neq0$. Thus $x^TA^TBAx>0$. Thus $A^TBA$ is positive definite.
(Only if) Suppose $A^TBA$ is positive definite. Then for all vectors $x\neq0$, $x^TA^TBAx>0$. Let $y= Ax$. Then $y^TBy>0$ must also hold.  If $A$ is singular, then for $x\neq0$, $y=Ax=0$. Then $x^TA^TBAx=0$ for some $x\neq0$. Thus $A$ must be nonsingular and $B$ positive definite.
Thanks for checking
 A: Here is my solution for a more complete Theorem:
Theorem:
For $A,B\in\mathbb{R}^{n\times n}$ and $x,y\in\mathbb{R}^n$, $A^TBA$ is positive (negative) definite if and only if $A$ is nonsingular and $B$ is positive (negative) definite.
Proof:
($\Rightarrow$) Suppose $A$ is nonsingular and $B$ is positive (negative) definite. By definition for all $y\neq0$, $y^TBy>0$ ($y^TBy<0$). Let $y=Ax$. Since $A$ is nonsingular, for all $y\neq0$, we have $x\neq0$. Thus $x^TA^TBAx>0$ ($x^TA^TBAx<0$), so $A^TBA$ is positive (negative) definite.
($\Leftarrow$) Suppose $A^TBA$ is positive (negative) definite. Then for all $x\neq0$, $x^TA^TBAx>0$ ($x^TA^TBAx<0$). Fistly, assume $A$ is nonsingular. Then for all $x\neq0$, $y=Ax\neq0$ and so $x^TA^TBAx = y^TBy >0$ ($x^TA^TBAx = y^TBy <0$). Hence $B$ is positive (negative) definite. Proceed by contradiction. Assume $A$ is singular. Then there exists a $x\neq0$ such that $y=Ax=0$. Thus we have $x\neq0$ for which $x^TA^TBAx=0$, and so we have a contradiction. Therefore, $A$ must be nonsingular and $B$ must be positive (negative) definite.
This may be extended to positive (negative) semidefinite $B\Leftrightarrow $ positive (negative) semidefinite $A^TBA$  if $A$ can also be singular, since we will have $x^TA^TBAx=0$ in the null space of $A$ (ie: $y=Ax = 0$ for $x\neq0$).
