Matrix Calculator

Perform matrix operations on 2×2 and 3×3 matrices. Calculate determinant, inverse, transpose, addition, subtraction, and multiplication with step-by-step working shown.

A matrix calculator performs operations on matrices — rectangular arrays of numbers — including determinants, inverses, dot products, and cross products. Matrices are foundational in linear algebra, computer graphics, machine learning, physics simulations, and engineering analysis. Matrix operations that would be laborious by hand are computed instantly. Quadratic Equation Solver and Probability & Combinations Calculator provide related mathematical tools.

  1. Enter matrix values row by row.
  2. Select the operation: determinant, inverse, transpose, dot product, or cross product.
  3. For two-matrix operations, enter both matrices ensuring compatible dimensions.
  4. The determinant must be non-zero for an inverse to exist.

Key matrix formulas

2×2 determinant: det(A) = ad − bc for [[a,b],[c,d]]

2×2 inverse: A⁻¹ = (1/det(A)) × [[d,−b],[−c,a]]

Dot product: a·b = Σ(aᵢ × bᵢ) (scalar result)

Cross product: a×b = [a₂b₃−a₃b₂, a₃b₁−a₁b₃, a₁b₂−a₂b₁] (3D vector result)

Interpreting matrix results

Key properties

Determinant = 0 means the matrix is singular (no inverse exists) and the system of equations it represents has no unique solution. The dot product measures how parallel two vectors are (dot product = 0 means perpendicular). The cross product produces a vector perpendicular to both input vectors — used in physics for torque and normal vectors in 3D graphics.

Math tips and best practices

Common mistakes to avoid

Matrix calculations are exact for rational inputs; floating-point arithmetic may introduce small rounding errors for large matrices or ill-conditioned systems. This calculator is for educational purposes.

Frequently Asked Questions

How do you find the determinant of a 2×2 matrix?

For a 2×2 matrix [[a,b],[c,d]], the determinant = ad − bc.

How do you find the inverse of a 2×2 matrix?

The inverse of [[a,b],[c,d]] = (1/det) × [[d,−b],[−c,a]], where det = ad − bc. The inverse only exists if det ≠ 0.

What does it mean if the determinant is zero?

A zero determinant means the matrix is singular (non-invertible) — the system of equations it represents has no unique solution.

What is matrix multiplication?

To multiply matrix A (m×n) by matrix B (n×p), each element [i][j] of the result = the dot product of row i of A and column j of B. The number of columns in A must equal the number of rows in B.

What is the transpose of a matrix?

The transpose flips a matrix over its diagonal — rows become columns and columns become rows. Element [i][j] becomes [j][i].

Related Calculators