Linear Algebra

Positive Semidefinite Matrix Square Root

Calculate and verify the unique symmetric positive semidefinite square root of a 2x2 matrix.

By Riano · Published · Updated · Report a correction

Positive Semidefinite Matrix Square Root

For a symmetric positive semidefinite (PSD) matrix A, there exists a unique symmetric PSD matrix X such that X2 = A. This is the principal square root of A.

Worked Example

Consider the symmetric matrix A:

A = [{5, 4}, {4, 5}]
  1. Calculate the trace and determinant: Tr(A) = 5 + 5 = 10, Det(A) = 25 - 16 = 9.
  2. Find the eigenvalues: λ2 - 10λ + 9 = 0, so λ1 = 9, λ2 = 1. Both are non-negative, so A is PSD.
  3. The eigenvalues of X will be √9 = 3 and √1 = 1.
  4. We can use the Cayley-Hamilton based formula for 2x2 matrices: X = (A + √Det(A) I) / √(Tr(A) + 2√Det(A)).
  5. √Det(A) = 3. A + 3I = [{8, 4}, {4, 8}].
  6. √(Tr(A) + 2√Det(A)) = √(10 + 6) = 4.
  7. X = (1/4) [{8, 4}, {4, 8}] = [{2, 1}, {1, 2}].
  8. Verify: X2 = [{2, 1}, {1, 2}] [{2, 1}, {1, 2}] = [{4+1, 2+2}, {2+2, 1+4}] = [{5, 4}, {4, 5}] = A.

Experiment

Open the Matrix Square Root module to interact with this concept:

  1. Set A11 to 5, A12 to 4, and A22 to 5.
  2. Observe that the displayed matrix X entries are indeed 2, 1, 1, 2, matching our worked example.
  3. Check the eigenvalues of A (1, 9) and the eigenvalues of X (1, 3).
  4. The maximum absolute entry of X2 − A is zero up to floating-point rounding. It is calculated from unrounded entries, not reconstructed from the displayed six decimals.
  5. Change A11 to 1, A12 to 0, and A22 to -1. The system correctly identifies this as "Outside PSD domain" because it has a negative eigenvalue (-1).
  6. Set A11, A12, and A22 all to 0. The output is exactly the zero matrix with a 0 residual, demonstrating correct handling of the edge case.

Limitations

This explorer is specifically designed for 2x2 symmetric positive semidefinite real matrices. If a matrix has negative eigenvalues, it is rejected by this module because it does not possess a real PSD square root, even though a real square root (which is not PSD) or a complex square root might exist. For matrices close to singular (e.g., A=[{1, 1}, {1, 1}]), floating-point arithmetic can introduce small non-zero values in the residual (on the order of 1e-15 to 1e-9) which are rounded for display purposes. The plot auto-fits the three vectors together; use the displayed coordinates of Xx when comparing different inputs. The closed-form analytical formula used here specifically targets 2x2 matrices and avoids 0/0 by handling the zero matrix case explicitly; larger matrices require different algorithms, like the Schur method or iterative approaches.

References

The concept of the principal square root is well-established in linear algebra:

  • What Is a Matrix Square Root? by Nicholas J. Higham. This article details the mathematical foundations and properties of matrix square roots, including the spectral construction for positive definite matrices and his explicit confirmation that a symmetric PSD matrix has a unique symmetric PSD square root. A singular PSD root is included here; uniqueness among all square roots is not claimed.

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Positive Semidefinite Matrix Square Root module.

Try Positive Semidefinite Matrix Square Root on Riano →

More in Linear Algebra