Enter your matrices
Paste Matrix A and (optionally) Matrix B. Use spaces or commas between numbers,
and start a new row on a new line. Examples:
2×2: 1 2 ↵ 3 4 ·
3×3: 1,0,2 ↵ -1,3,1 ↵ 3,2,0
This free Matrix Calculator helps you do the matrix operations people actually need: addition, subtraction, multiplication, plus the big “exam favorites”: determinant, inverse, transpose, and RREF (row‑reduced echelon form). It runs 100% in your browser — no signup, no installs, no weird ads popups.
Paste Matrix A and (optionally) Matrix B. Use spaces or commas between numbers,
and start a new row on a new line. Examples:
2×2: 1 2 ↵ 3 4 ·
3×3: 1,0,2 ↵ -1,3,1 ↵ 3,2,0
Matrices look scary until you realize they’re basically “number tables” with strict rules. A matrix is written as A, B, etc., and has a size called its dimension: m×n means m rows and n columns. Once you know the dimension, you can predict which operations are allowed and what the result will look like.
Addition is the most straightforward matrix operation: you add corresponding entries. The catch is that the matrices must be the same size. If A and B are both 2×2, then:
If A = \(\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}\) and B = \(\begin{bmatrix} b_{11} & b_{12} \\ b_{21} & b_{22} \end{bmatrix}\), then A + B = \(\begin{bmatrix} a_{11}+b_{11} & a_{12}+b_{12} \\ a_{21}+b_{21} & a_{22}+b_{22} \end{bmatrix}\).
This works for any size. That’s why addition is commonly used in data science (adding feature matrices), graphics (combining transformations in certain representations), and even basic statistics (adding observation tables).
Subtraction uses the same “same-size” rule as addition. You subtract entry-by-entry: \((A-B)_{ij} = a_{ij} - b_{ij}\). Many mistakes happen here because people try to subtract matrices of different dimensions (like a 2×3 minus a 3×2). If the shapes don’t match, subtraction is undefined.
This is the operation that turns matrices into a superpower. Multiplication is defined when the number of columns in A equals the number of rows in B. If A is m×n and B is n×p, the product AB is m×p.
The entry in row i, column j of AB is the dot product of row i of A with column j of B: \((AB)_{ij} = \sum_{k=1}^{n} a_{ik} b_{kj}\). In plain English: multiply matching pairs, add them up.
Why is this viral for students? Because it’s the number one place people get stuck: they mix up rows vs columns, or they forget the dimension rule. If you remember one mantra, remember this: (m×n)·(n×p) = (m×p).
The transpose flips a matrix across its diagonal: rows become columns and columns become rows. If A is m×n, then Aᵀ is n×m. In coordinates, \((A^T)_{ij} = a_{ji}\). Transposes show up everywhere: covariance matrices, least squares, orthogonal matrices, and “make the dimensions match” moments in linear algebra.
The determinant is a single number you can compute only for square matrices (n×n). It tells you important geometric information: whether the transformation squashes space, flips orientation, or preserves volume (up to a scale factor). The most practical rule: If det(A) = 0, the matrix is not invertible.
For 2×2 matrices, the determinant is quick: If A = \(\begin{bmatrix} a & b \\ c & d \end{bmatrix}\), then det(A) = ad − bc.
For 3×3 matrices, it gets longer (expansion or row reduction). This calculator uses stable methods under the hood (Gaussian elimination) rather than giant symbolic expansions, which is faster and less error-prone for numeric input.
The inverse is the matrix that “undoes” A. If A is invertible, then A·A⁻¹ = I, where I is the identity matrix (ones on the diagonal). Inverses are central to solving systems, isolating variables, and reversing transformations.
For a 2×2 matrix \(A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\), the inverse is: \(A^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}\), as long as ad − bc ≠ 0.
For larger matrices, we typically compute the inverse using row operations (augmenting A with I and reducing), which is exactly the logic this calculator applies numerically. If the process hits a “zero pivot” that can’t be fixed by swapping rows, the matrix is singular (non-invertible).
RREF is the “final cleaned-up” version you get after applying Gaussian elimination all the way. It’s used for solving linear systems, finding rank, checking independence, and understanding solution sets. In RREF, each leading entry in a nonzero row is 1, and it is the only nonzero entry in its column.
This is why RREF feels like magic: once a matrix is in RREF, you can read solutions directly. That’s extremely useful for exams because it reduces a messy system to something interpretable.
Use these to test your understanding, or to verify that your inputs are formatted correctly. Try them as-is, then change a number and see how the result changes — that’s the fastest way to learn.
1 2 ↵ 3 45 6 ↵ 7 86 8 ↵ 10 121 0 2 ↵ -1 3 13 1 ↵ 2 1 ↵ 1 04 7 ↵ 2 64 7 ↵ 2 66 -7 ↵ -2 41 2 1 ↵ 2 4 0 ↵ 3 6 3If you’re checking homework: compute your result by hand, then use this tool as the “answer key” to verify. If they differ, the dimension rule is usually the culprit.
This Matrix Calculator is built to behave like a helpful teacher: it checks the rules first, then computes results using standard linear algebra methods. Everything runs locally in your browser using JavaScript — meaning your matrix inputs never leave your device.
Here’s the pipeline in simple steps:
If the calculator rejects an operation, it’s not being “picky” — it’s enforcing the math rules exactly. That’s a feature, because it trains your intuition: once you get good at dimension checks, matrix problems become dramatically easier.
Real-number matrix operations often produce decimals (especially inverse and RREF). The “Decimal precision” control lets you choose how many decimals to display. If your result looks slightly off (like 0.999999 instead of 1), increase the precision to see the tiny numerical residue. That residue is normal when doing floating-point math.
You can separate numbers by spaces or commas. Each new line becomes a new row. For example, a 3×3 can be pasted as “1 0 2” on the first line, then “-1 3 1” on the next, etc.
Because the operation you selected isn’t defined for the shapes you entered. A + B and A − B require identical dimensions. A × B requires columns(A) = rows(B). Determinant and inverse require A to be square.
RREF exposes the “clean structure” of a matrix after full row reduction. It helps you solve systems, find rank, and identify pivot columns (which relate to independence). If you augment a system matrix with a constants column, RREF can show solutions directly.
If det(A)=0 (or the matrix is singular), there is no inverse. Sometimes a matrix is “almost singular” and numerical rounding makes it tricky. Try higher precision or double-check your input values.
This is a numeric matrix tool (it works with numbers). If you need symbolic variables (like x and y), you’ll want a CAS. For most school and engineering checks with actual numbers, numeric is exactly what you want.
No server storage. All calculations happen in your browser. If you click “Save Result,” it stores only on your device in localStorage so you can compare later.
MaximCalculator provides simple, user-friendly tools. Always treat results as educational help and double-check any important numbers elsewhere.