Glam Prestige Journal

Bright entertainment trends with youth appeal.

$\begingroup$

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]

$\endgroup$

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 array X.

So since $\sqrt 4 = 2$, that's what you get.

Reading further on that page, we find

See sqrtm for the matrix square root.

which is probably the one you actually expected.

$\endgroup$ 0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy