Add, subtract and multiply matrices, scalar multiply, raise a matrix to a power, and compute the transpose, determinant and inverse of matrices up to 5×5 — with step-by-step work.
Set the size and values of Matrix A and Matrix B, choose + or −, then calculate
Multiplication A×B needs the columns of A to equal the rows of B.
Set the size and values of Matrix A and Matrix B, then calculate A × B
k can be 0 (identity), positive (repeated multiplication), or negative (power of the inverse) — only if A is invertible.
Choose a square matrix size, fill in the values and an exponent, then calculate Aᵏ
Choose the size, fill in the values, then calculate the transpose (rows and columns don't need to be equal)
Choose a square matrix size and fill in the values to calculate its determinant
Choose a square matrix size and fill in the values to calculate its inverse
This free matrix calculator handles the six core operations of linear algebra in one tool: addition, subtraction, and scalar multiplication of matrices, matrix-by-matrix multiplication, raising a square matrix to an integer power, transposing a matrix, computing its determinant via cofactor expansion, and finding its inverse through the adjugate method — for matrices up to 5×5, with full step-by-step working shown. Matrices are rectangular arrays of numbers that represent linear transformations, systems of equations, and multi-dimensional data, making this 2x2 matrix calculator and 3x3 matrix calculator equally useful for a quick homework check or a deeper linear algebra problem. Every calculation shows its reasoning, so you can see exactly how the result was derived rather than just the final numbers.
The tool offers six distinct modes. Add/Subtract combines two matrices of identical dimensions entry-by-entry. Multiply computes the matrix product A×B (requiring A's columns to equal B's rows) and also includes a separate scalar multiplication card for k×A. Power of a Matrix raises a square matrix to an integer exponent, including negative exponents via the inverse. Transpose flips any matrix (square or rectangular) over its main diagonal. Determinant computes the scalar determinant of a square matrix using cofactor expansion. Inverse computes A⁻¹ via the adjugate method, flagging singular matrices that have no inverse.
This tool is built for students learning linear algebra, engineers solving systems of linear equations, computer graphics and game developers working with transformation matrices, machine learning practitioners studying the matrix operations behind neural networks, and economics or statistics students modeling multi-variable relationships. It's equally useful for quickly checking a hand-computed determinant or inverse before relying on it further.
Matrices compactly represent systems of linear equations, geometric transformations, and multi-dimensional datasets, making matrix operations the backbone of linear algebra. The determinant tells you at a glance whether a system of equations has a unique solution (non-zero determinant) or not (singular, zero determinant). Matrix multiplication is the core operation inside computer graphics rendering pipelines and machine learning models, where inputs, weights, and transformations are all represented as matrices multiplied together.
Computer graphics represents rotation, scaling, and translation as matrices applied to points in 2D or 3D space. Machine learning uses matrix multiplication as the fundamental operation inside neural network layers and linear regression. Engineers solve systems of linear equations describing circuits, structural loads, or control systems using matrix methods. Economists model input-output relationships between interacting sectors using matrices. Some classical cryptography schemes, like the Hill cipher, use matrix multiplication and inversion for encoding and decoding messages.
How this matrix calculator computes each of its six operations
Unlike ordinary multiplication, A × B ≠ B × A in general for matrices — order matters.
Determinants of matrices larger than 2×2 expand recursively along a row using smaller minors and alternating signs.
A zero determinant means the matrix is singular; the inverse formula would require dividing by zero, so no inverse exists.
From choosing an operation to verifying the result
Pick Add/Subtract, Multiply, Power, Transpose, Determinant, or Inverse from the mode tabs.
Choose the number of rows and columns (up to 5×5) for each matrix using the size selectors.
Enter a number into every cell of the matrix grid — decimals and negative values are accepted.
The calculator validates the dimensions for your chosen operation and computes the result instantly.
Review the resulting matrix, determinant, or inverse, along with the explanation of how it was derived.
For small matrices, recompute one or two entries by hand to confirm the result matches.
Multiplying two 2×2 matrices, then checking invertibility
Given A = [[1,2],[3,4]] and B = [[5,6],[7,8]], find A × B, then determine whether A itself is invertible.
Explanation: Each entry of A×B is a dot product between a row of A and a column of B, which is why matching inner dimensions (A's columns = B's rows) is required. Because det(A) is nonzero, A is invertible — multiplying A by its computed inverse A⁻¹ would return the identity matrix [[1,0],[0,1]], confirming the inverse is correct.
What each output actually means
| Result | What It Means | Example |
|---|---|---|
| Sum/Difference matrix | Entry-by-entry combination of two same-sized matrices | [[1,2],[3,4]] + [[5,6],[7,8]] = [[6,8],[10,12]] |
| Product matrix (A×B) | Each entry is a dot product of a row of A and a column of B | [[1,2],[3,4]] × [[5,6],[7,8]] = [[19,22],[43,50]] |
| Determinant = 0 | The matrix is singular — no inverse exists, rows/columns are linearly dependent | [[1,2],[2,4]] has det = 0 |
| Determinant ≠ 0 | The matrix is invertible — a unique inverse exists | [[1,2],[3,4]] has det = −2, invertible |
| Inverse matrix (A⁻¹) | Satisfies A × A⁻¹ = the identity matrix | Inverse of [[1,2],[3,4]] is [[−2,1],[1.5,−0.5]] |
Reading a singular result: if the calculator reports "This matrix is singular (determinant = 0) and has no inverse," that's a valid mathematical outcome, not an error — it means the matrix's rows or columns are linearly dependent.
Typical ranges: determinant values can be any real number, positive, negative, or zero; the sign indicates orientation-preserving (positive) vs. orientation-reversing (negative) transformations in geometric contexts.
Manual verification: multiply your computed inverse back by the original matrix — the product should equal the identity matrix (1s on the diagonal, 0s elsewhere), confirming the inverse is correct.
Where matrix operations are genuinely useful
Practice matrix addition, multiplication, determinants, and inverses for coursework.
Quickly verify matrix calculations for engineering entrance and competitive math exams.
Represent rotation, scaling, and translation transformations as matrices applied to 3D points.
Understand matrix multiplication as the core operation inside neural network layers.
Solve systems of linear equations representing circuits, structures, or control systems.
Model relationships between multiple interacting economic sectors using matrices.
Study classical matrix-based encryption schemes like the Hill cipher.
Represent and transform datasets as matrices for statistical and machine learning pipelines.
Generate instant, step-by-step matrix examples for classroom demonstrations.
Sanity-check a custom matrix library's multiplication, determinant, or inverse implementation.
Explore matrix properties like singularity, symmetry, and transformation composition.
Use matrices to represent state transitions and transformations in robotics and control theory.
Demonstrate how matrix transformations and their inverses relate to classical encoding schemes.
What this matrix calculator does well, and where it has boundaries
When to use addition, multiplication, determinant, inverse, and transpose
| Operation | Requires Square Matrix? | When to Use |
|---|---|---|
| Addition / Subtraction | No (needs matching dimensions) | Combining or comparing datasets of the same shape |
| Multiplication | No (needs A's cols = B's rows) | Composing transformations or computing weighted sums |
| Determinant | Yes | Checking if a system of equations has a unique solution |
| Inverse | Yes | "Undoing" a transformation or solving Ax = b directly |
| Transpose | No | Switching between row and column orientation of data |
Summary: This matrix calculator gives you an instant, free way to add, subtract, multiply, and scalar-multiply matrices, raise them to a power, transpose them, and compute their determinant and inverse — all with step-by-step working shown. Pair it with the Scientific Calculator and Fraction Calculator for a fuller toolkit of algebra and linear algebra tools.
Common questions about matrix arithmetic and operations
Trusted educational references to go deeper on matrices and linear algebra
Explore other math tools