<s>[INST] Find the square root of a matrix Let $A$ be the matrix
$$A = \left(\begin{array}{cc}
41 & 12\\
12 & 34
\end{array}\right).$$
I want to decompose it into the form of $B^2$.
I tried diagonalization , but can not move one step further.
Any thought on this? Thanks a lot!
ONE STEP FURTHER:
How to find a upper triangular $U$ such that $A = U^T U$?
 [/INST] This is an expansion of Arturo's comment.
The matrix has eigenvalues $50,25$, and eigenvectors $(4,3),(-3,4)$, so it eigendecomposes to $$A=\begin{pmatrix}4 & -3 \\ 3 & 4\end{pmatrix} \begin{pmatrix}50 & 0 \\ 0 & 25\end{pmatrix} \begin{pmatrix}4 & -3 \\ 3 & 4\end{pmatrix}^{-1}.$$
This is of the form $A=Q\Lambda Q^{-1}$. If this is $B^2$, then there will be a $B$ of the form $Q\Lambda^{1/2} Q^{-1}$ (square this to check this is formally true). A square root of a diagonal matrix is just the square roots of the diagonal entries, so we have
$$B=\begin{pmatrix}4 & -3 \\ 3 & 4\end{pmatrix} \begin{pmatrix}\sqrt{50} & 0 \\ 0 & \sqrt{25}\end{pmatrix} \begin{pmatrix}4 & -3 \\ 3 & 4\end{pmatrix}^{-1}$$
$$=\frac{1}{5}\begin{pmatrix}9+16\sqrt{2} & -12+12\sqrt{2} \\ -12+12\sqrt{2} & 16+9\sqrt{2}\end{pmatrix}.$$
Here we used $\sqrt{50}=5\sqrt{2},\sqrt{25}=5$, and a quick formula for the inverse of a $2\times 2$ matrix:
$$\begin{pmatrix}a&b\\c&d\end{pmatrix}^{-1}=\frac{1}{ad-bc}\begin{pmatrix}d&-b\\-c&a\end{pmatrix}.$$
Keep in mind that matrix square roots are not unique (even up to sign), but this particular method is guaranteed to produce one example of a real matrix square root whenever $A$ has all positive eigenvalues.

Finding an upper triangular $U$ such that $A=U^TU$ is even more straightforward:
$$A=\begin{pmatrix} a&0 \\ b&c \end{pmatrix} \cdot  \begin{pmatrix} a&b \\ 0&c \end{pmatrix} $$
This is $a^2=41$ hence $a=\sqrt{41}$, $ab=12$ hence $b=\frac{12}{41}\sqrt{41}$, and $b^2+c^2=34$ hence $c=25\sqrt{\frac{2}{41}}$.
In other words,
$$U=\sqrt{41}\begin{pmatrix}1&\frac{12}{41}\\0&\frac{25}{41}\sqrt{2}\end{pmatrix}. $$
</s>