Free Matrix Calculator – Add, Multiply, Invert & Solve Matrices

A complete matrix calculator for students and professionals: addition, subtraction, multiplication, transpose, determinant, inverse, adjoint, rank, trace, RREF, matrix powers, scalar multiplication, and solving linear systems AX = B. Enter your own values — everything calculates instantly in your browser.

Using both matrices
Matrix A operations
Matrix B operations
Result — A + B
0
0
0
0
Click the result to copy

What Is a Matrix Calculator?

A matrix calculator performs linear algebra operations on user-entered matrices instantly — without needing a graphing calculator, MATLAB license, or manual computation. This tool supports two matrices, A and B, and covers the full range of operations typically taught in a linear algebra or precalculus course: arithmetic between matrices, single-matrix transformations, and the structural properties used to analyze a matrix or solve a system of linear equations.

Everything runs directly in your browser using standard linear algebra algorithms — cofactor expansion for determinants and adjoints, and Gauss-Jordan elimination for row reduction — so results appear instantly as you type, with no server round-trip and no data stored.

Supported Operations — Quick Reference

The table below summarizes every operation this calculator supports, the dimensional requirements, and what each one returns:

OperationRequirementReturns
A + B / A − BSame dimensionsMatrix (same size)
A × BColumns of A = Rows of BMatrix (rows A × cols B)
Scalar k·AAny matrixMatrix (same size)
Transpose AᵀAny matrixMatrix (rows ↔ cols swapped)
Determinant det(A)Square matrix onlySingle number
Inverse A⁻¹Square, det ≠ 0Matrix (same size)
Adjoint adj(A)Square matrix onlyMatrix (same size)
RankAny matrixSingle number
TraceSquare matrix onlySingle number (sum of diagonal)
RREFAny matrixMatrix (reduced row echelon form)
Power AⁿSquare matrix onlyMatrix (same size)
Solve AX = BA square & invertibleMatrix X = A⁻¹B

How to Use This Matrix Calculator

Key Formulas Behind Each Operation

Determinant (Cofactor Expansion)

For a 2×2 matrix [[a, b], [c, d]], the determinant is ad − bc. For larger matrices, this calculator uses recursive cofactor expansion along the first row. The determinant tells you whether a matrix is invertible (non-zero det) or singular (det = 0), and its absolute value represents the scaling factor the matrix applies to area or volume.

Inverse (via Adjugate)

A⁻¹ = (1 / det(A)) × adj(A)

The inverse exists only when the determinant is non-zero. This calculator computes the cofactor matrix, transposes it to get the adjugate, then scales by 1/det. The inverse is essential for solving systems: if AX = B, then X = A⁻¹B.

RREF (Gauss-Jordan Elimination)

Reduced Row Echelon Form is the simplest equivalent form of a matrix, produced by applying elementary row operations until every leading entry is 1 and is the only non-zero entry in its column. RREF reveals rank, solution existence, and free variables in underdetermined systems.

Worked Examples

Example 1: 2×2 Matrix Multiplication

A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]]

Result: [[19, 22], [43, 50]]

Example 2: Determinant and Inverse

A = [[4, 7], [2, 6]]

Example 3: Solving a Linear System

Solve: 2x + y = 5 and 4x + 3y = 11

When and Why You Would Use Each Operation

If you need to work with the individual numbers in your results — computing percentages, averages, or statistical measures — our percentage calculator and mean, median, mode calculator handle those computations.

Why Some Operations Show an Error

Common Mistakes in Matrix Operations

Where Matrices Are Used in the Real World

Frequently Asked Questions

Is this matrix calculator free to use?

What is the largest matrix size supported?

Why does my matrix have no inverse?

What does it mean if 'Solve AX = B' shows an error?

What is the difference between rank and RREF?

Is matrix multiplication commutative?

Can I use decimals or negative numbers?

Can I copy results to a spreadsheet?

Does this tool store the matrices I enter?

Final Thoughts

Matrices are the language of linear algebra, and linear algebra is the mathematical backbone of everything from search algorithms to 3D video games to medical imaging. This calculator gives you instant access to every standard matrix operation — enter your values, pick an operation, and see the result in real time. For related math tools, try our percentage calculator for ratio-based computations, our mean, median, mode calculator for descriptive statistics, or our GPA calculator for weighted academic averages.