Y = sqrtm(X)
Y = sqrtm(X) is one of the many matrices that satisfy
IfY*Y = X
X is symmetric and positive definite, then Y is the unique positive definite square root.
This matrix is symmetric and positive definite. Its unique positive definite square root,X =5 -4 1 0 0-4 6 -4 1 01 -4 6 -4 10 1 -4 6 -40 0 1 -4 5
Y = sqrtm(X), is a representation of the second difference operator.
The matrixY =2 -1 0 0 0-1 2 -1 0 00 -1 2 -1 -00 0 -1 2 -10 0 -0 -1 2
has four square roots. Two of them areX =7 1015 22
andY1 =1.5667 1.74082.6112 4.1779
The other two areY2 =1 23 4
-Y1 and -Y2. All four can be obtained from the eigenvalues and vectors of X.
The four square roots of the diagonal matrix[V,D] = eig(X);D =0.1386 00 28.8614
D result from the four choices of sign in
All fourS =±0.3723 00 ±5.3723
Ys are of the form
TheY = V*S/V
sqrtm function chooses the two plus signs and produces Y1, even though Y2 is more natural because its entries are integers.Finally, the matrix
does not have any square roots. There is no matrixX =0 10 0
Y, real or complex, for which Y*Y = X. The statement
Y = sqrtm(X)
produces
WARNING: Result from FUNM is probably inaccurate.Y =0 00 0
sqrtm(X) is an abbreviation for funm(X,'sqrt'). The algorithm used by funm is based on a Schur decomposition. It can fail in certain situations where X has repeated eigenvalues. See funm for details.
expm,funm,logm
(c) Copyright 1994 by The MathWorks, Inc.