Matrix Calculator

Perform matrix operations including addition, subtraction, multiplication, determinant, inverse, and transpose on matrices up to 4×4. Essential for linear algebra, engineering, physics, and computer graphics.

Matrix A
Matrix B
Matrix Operation Reference
2×2 determinant: det([a b; c d]) = ad − bc Inverse (2×2): A⁻¹ = (1/det) × [d −b; −c a] Only exists when det(A) ≠ 0 Transpose: (Aᵀ)ᵢⱼ = Aⱼᵢ — rows become columns
OperationRequirement
A + B / A − BA and B must have the same dimensions
A × BColumns of A must equal rows of B
det(A)A must be square (n × n)
A⁻¹Square matrix and det(A) ≠ 0
AᵀAny matrix — dimensions become m×n → n×m
How to use
Selecting an operation

Choose the operation from the button row at the top. Operations marked with A and B (add, subtract, multiply) require two matrices. Det, inverse, and transpose only use Matrix A.

Matrix size

Click 2×2, 3×3, or 4×4 to resize the matrix. All cells reset to 0 when resized. For multiplication, the number of columns in A must equal the number of rows in B.

Determinant

Only defined for square matrices. A non-zero determinant means the matrix is invertible. If det = 0, the matrix is singular and has no inverse.

Inverse

The inverse A⁻¹ satisfies A × A⁻¹ = I (identity matrix). Only exists when the determinant is non-zero. Used to solve systems of linear equations.

Tips
  • Matrix multiplication is not commutative: A×B ≠ B×A in general.
  • For a 2×2 matrix [a,b;c,d], det = ad − bc.
  • To solve Ax = b for x, compute x = A⁻¹ × b using the inverse operation.