Matrix Square is a Proper Function? Let's identify the set of $r\times n$ matrices with real coefficients with $\mathbb{R}^{rn}$ and let $P_n$ be the space of symmetric positive semi-definite matrices (with topology induced by restriction from $\mathbb{R}^{d(d+1)/2}$.  Then, is the map
$$
A \mapsto A^TA,
$$
proper?
 A: Yes. 
Let $M(n)$ be the real vector space of  $n\times n$-matrices and $S(n)$ be the linear subspace of symmetric matrices which has dimension $n(n+1)/2$.
We shall first show that $f : S(n) \to M(n), f(A) =A^TA =A^2$, is proper.
Let $\lVert - \rVert_2$ denote the Euclidean norm on $\mathbb R^n$. Then
$$ \lVert A \rVert_2 = \sup \{ \lVert A(x) \rVert_2 : \lVert x \rVert_2 = 1 \}$$
is a norm on $M(n)$ which induces a norm on $S(n)$. It is well-known that $\lVert A \rVert_2 = \sqrt{\lvert \lambda_{max} \rvert}$, where $\lambda_{max}$ is the eigenvalue of the symmetric matrix $A^TA$ with maximal absolute value. See for example Why does the spectral norm equal the largest singular value?
If $A$ is itself symmetric, them one can easily show that  $\lVert A \rVert_2 = \lvert \mu_{max} \rvert$, where $\mu_{max}$ is the eigenvalue of $A$ with maximal absolute value. See also Equivalent Definitions of the Spectral Norm. However, we shall not need this here.
Now let $K \subset M(n)$ be compact. Let $R = \max(1,\sup \{ \lVert B \rVert_2 \mid B \in K \} )$. Assume that the closed subset $f^{-1}(K)$ of $S(n)$ is not compact. Then $f^{-1}(K)$ is not bounded and contains some $A$ such that $\lVert A \rVert_2 > R$. We have $\lVert A \rVert_2 = \sqrt{\lvert \lambda_{max} \rvert}$ with an eigenvalue $\lambda_{max}$ of $A^TA$. Since $A \in S(n)$, we have $A^TA= A^2$, thus $\lambda_{max}$ is an eigenvalue of $A^TA= A^2$. But then $\lambda^2_{max}$ is an eigenvalue of $(A^2)^2 = f(A)^2 = f(A)^T f(A)$, thus $\lVert f(A) \rVert_2 \ge \sqrt{\lvert \lambda^2_{max} \rvert} = \lvert \lambda_{max} \rvert = \lVert A \rVert^2_2 > R^2 \ge R$.
Hence $f(A) \in K$ and $\lVert f(A) \rVert_2 > R$ which is as a contradiction.
Therefore $f$ is proper.
Now let $S_{psd}(n)$ be the topological subspace of $S(n)$ whose elements are positive semi-definite. We shall prove that $S_{psd}(n)$ is closed in $S(n)$ which immediately implies that the restriction of $f$ to $S_{psd}(n)$ is proper.
For each $x$ the map $\phi_x : S(n) \to \mathbb R, \phi_x(A) = x^TAx$, is continuous. Thus $S(n)_x = \{ A \in S(n)  \mid \phi_x(A) \ge 0 \} = \phi_x^{-1}([0,\infty))$ is closed. But $S_{psd}(n) = \bigcap_{x \in \mathbb R^n} S(n)_x$, thus it is closed.
Remark: We may regard $f : S_{psd}(n) \to M(n)$ as a map into $S(n)$ or a a map into $S_{psd}(n)$. Of course these maps are also proper.
