Matrix Calculator

Free online Matrix Calculator supporting addition, subtraction, multiplication, transpose, determinant, inverse, rank, and trace. Instant results in your browser.

880.2K uses Updated · 2026-04-27 Runs locally · zero upload
AD

How to Use Matrix Calculator

The Matrix Calculator makes it easy to perform linear algebra operations online without any software installation.

  1. Choose an operation — Select from Add, Subtract, Multiply, Scalar Multiply, Transpose, Determinant, Inverse, Rank, or Trace.
  2. Set matrix dimensions — Use the row/column dropdowns to define the size of Matrix A (and Matrix B when needed).
  3. Enter values — Click each cell and type a number. The Matrix Calculator updates the result instantly.

For operations that only need one matrix (Transpose, Determinant, Inverse, Rank, Trace), Matrix B is hidden automatically. For Scalar Multiply, an additional scalar input appears.

Formula & Theory — Matrix Calculator

The Matrix Calculator implements standard linear algebra algorithms:

Addition / Subtraction:   C[i][j] = A[i][j] ± B[i][j]
Multiplication:           C[i][j] = Σ A[i][k] × B[k][j]
Scalar multiply:          C[i][j] = s × A[i][j]
Transpose:                Aᵀ[i][j] = A[j][i]
Determinant (2×2):        det(A) = ad − bc
Inverse:                  A⁻¹ = (1/det(A)) × adj(A)
Trace:                    tr(A) = Σ A[i][i]
Rank:                     Number of linearly independent rows (via row reduction)
ConstraintRule
Addition / SubtractionA and B must have identical dimensions
Multiplicationcols(A) must equal rows(B)
Determinant / Inverse / TraceMatrix must be square
Inversedet(A) ≠ 0

The Matrix Calculator uses Gaussian elimination for rank and inverse, ensuring numerical stability for up to 5×5 matrices.

Use Cases for Matrix Calculator

The Matrix Calculator is used in a wide range of disciplines:

  • Students learning linear algebra can verify homework answers on determinants, inverses, and matrix products using the Matrix Calculator.
  • Engineers use matrix operations for structural analysis, circuit simulation, and control systems design.
  • Data scientists apply the Matrix Calculator to check covariance matrices, transformations, and principal component analysis (PCA) by hand.
  • Programmers validate matrix logic in game engines or graphics pipelines with quick spot-checks via the Matrix Calculator.
  • Physicists use the Matrix Calculator to compute rotation matrices, quantum state transformations, and eigenvalue preparation.

Whether you are solving a 2×2 system of equations or verifying a 4×4 transformation matrix, the Matrix Calculator handles it instantly — no sign-up required, no data stored.

Frequently asked questions about Matrix Calculator

What operations does the Matrix Calculator support?

The Matrix Calculator supports matrix addition, subtraction, multiplication, scalar multiplication, transpose, determinant, inverse, rank, and trace — all computed instantly in your browser.

What matrix sizes can I use?

You can choose between 2×2, 3×3, 4×4, and 5×5 matrices. For binary operations like addition or multiplication, each matrix size can be set independently.

When does the Matrix Calculator show an error for inverse?

The Matrix Calculator shows an error when the determinant equals zero, meaning the matrix is singular and no inverse exists.

Does matrix multiplication require square matrices?

No. Matrix multiplication only requires that the number of columns in Matrix A equals the number of rows in Matrix B.

Is my data stored?

No. All calculations happen in your browser; nothing is sent to a server.