If H = [4 4; 4 4]
Why is sqrt(H)=[2 2; 2 2]
And, (H)^0.5=[1.4142 1.4142; 1.4142 1.4142]
2 Answers
$\begingroup$In the first case, it's taking the square root of each element. In the second case, it's determining the matrix that, when multiplied by itself, gives $H$, i.e., the "square root" of $H$.
$\endgroup$ 0 $\begingroup$Looking at the MATLAB documentation of the sqrt() function, we see (emphasis mine):
B = sqrt(X)returns the square root of each element of the arrayX.
So since $\sqrt 4 = 2$, that's what you get.
Reading further on that page, we find
See
sqrtmfor the matrix square root.
which is probably the one you actually expected.
$\endgroup$ 0