I came across a question in Strang's book stated:
Since it is a matrix with same eigenvalues that is $0$ and eigenvector $[1\ 0]^t$
In second part, even with replacing diagonal entries that is $0$ to $4$ the eigenvalues remains equal that is $4$ and eigenvector $[1\ 0]^t$
Since this can't be diagonalized as $S^{-1}$ doesn't exist as matrix have dependent eigenvector
How to find its square root ?
Sorry for the formatting and thanks in advance.

If $S$ is a $2\times2$ matrix whose only eigenvalue is $0$, then $S$ is similar to a matrix of the form$$\begin{pmatrix}0&a\\0&0\end{pmatrix}.$$Therefore, $S^2$ is the null matrix.
On the other hand,$$\begin{pmatrix}2&a\\0&2\end{pmatrix}^2=\begin{pmatrix}4&4a\\0&4\end{pmatrix}.$$So, take $a=\frac14$.