Matrix Square Root Calculator

Enter the four entries of your 2x2 matrix to find its principal square root.

How it is calculated

The matrix is entered as [a, b; c, d], with a and b in the top row and c and d in the bottom row. The tool uses the closed form for the principal square root of a 2×2 matrix. First det = ad − bc and trace = a + d. Then s = √det and t = √(trace + 2s), and the root is (A + s·I) ÷ t, meaning [(a + s) ÷ t, b ÷ t; c ÷ t, (d + s) ÷ t]. Squaring that matrix gives back A.

The result is shown as [w, x; y, z] with four decimals, together with the determinant and the trace. The all-zero matrix returns zeros. There is no result when the determinant is negative, or when trace + 2s is zero or less (for example [−4, 0; 0, −4], or [0, 1; 0, 0], which has no square root at all). Only real roots are produced, never complex ones, and only 2×2 matrices are supported.

Worked example

Take A = [5, 4; 4, 5]. The determinant is 5×5 − 4×4 = 25 − 16 = 9 and the trace is 5 + 5 = 10. Then s = √9 = 3 and t = √(10 + 2×3) = √16 = 4. Each entry of the root is (A + 3I) ÷ 4, so the diagonal becomes (5 + 3) ÷ 4 = 2 and the off-diagonal entries become 4 ÷ 4 = 1. The principal square root is [2.0000, 1.0000; 1.0000, 2.0000]. Check: [2, 1; 1, 2] times itself gives [5, 4; 4, 5], which is A.

Try this example →

Common mistakes

  • Entering the entries column by column. The order is a, b (first row) and c, d (second row).
  • Expecting the root to be the square root of each entry. The square root of [5, 4; 4, 5] is not [√5, 2; 2, √5]; the entries mix as shown above.
  • Expecting a result for every matrix. A negative determinant, or a trace + 2√det at or below zero (such as a matrix with both eigenvalues negative), gives no real principal root and nothing is shown.
  • Assuming the answer is the only root. A matrix can have several square roots, and the tool gives the principal one, whose eigenvalues are not negative.
  • Trying a 3×3 matrix. Only four entries, for a 2×2 matrix, are accepted.

About this calculator

The square root of a matrix A is a matrix B such that B² = A — a natural extension of ordinary square roots into linear algebra, but one that isn't always unique or guaranteed to exist for every matrix. For a general 2×2 matrix, the principal square root can be computed directly from a closed-form formula involving the matrix's trace (the sum of its diagonal entries) and determinant, without resorting to eigendecomposition.

This calculator takes the four entries of a 2×2 matrix and returns its principal square root along with its trace and determinant. Matrix square roots show up in control theory, computer graphics (interpolating rotation and transformation matrices), and numerical methods for solving matrix equations, making this a useful reference for students and practitioners who need to verify a hand calculation or quickly check a specific 2×2 case.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    Squaring the output is the quickest check. For [4, 0; 0, 9] the tool gives [2, 0; 0, 3], and for [2, 1; 0, 2] it gives [1.4142, 0.3536; 0.0000, 1.4142]. It returns no result for [0, 1; 0, 0], and for [1, 2; 3, 1], whose determinant is negative, so an empty answer means no principal root of this kind, not a typing slip. Do you need larger matrices, and which sizes?

Popular calculators

All Calculators