Matrix Calculator
Perform matrix addition, multiplication, determinant, inverse, transpose, RREF, rank, and power up to 6x6 with optional step-by-step solutions.
Updated
Matrix Calculator
Free matrix calculator for addition, subtraction, multiplication, determinant, inverse, transpose, RREF, rank, trace and matrix powers. Step-by-step calculations up to 6x6.
Matrix A3 x 3
Matrix B3 x 3
Operations
| 2 | 2 | 3 |
| 0 | 2 | 4 |
| 5 | 6 | 1 |
Frequently Asked Questions
What is the Matrix Calculator?
The Matrix Calculator is a free online tool that perform matrix addition, multiplication, determinant, inverse, transpose, rref, rank, and power up to 6x6 with optional step-by-step solutions.. It runs entirely in your browser with no installation or sign-up needed.
What operations?
Addition, subtraction, multiplication, scalar multiplication, power, transpose, determinant, inverse, trace, rank, and RREF for matrices up to 6x6.
Is it free?
Yes — completely free, no registration. All math runs client-side in your browser.
Step-by-step solutions?
Yes. Enable the step-by-step toggle to see cofactor expansion for determinants and full Gauss-Jordan row operations for matrix inverses.
Is my data safe with this tool?
Absolutely. The Matrix Calculator processes everything client-side in your browser. No data is uploaded to or stored on any server. Your content remains private on your device at all times.
Does the Matrix Calculator work on mobile devices?
Yes, the Matrix Calculator is fully responsive and works on smartphones and tablets. You can use it on any device with a modern web browser -- no app download required.
Do I need to create an account to use this tool?
No account or registration is needed. Simply open the Matrix Calculator in your browser and start using it immediately. There are no sign-up walls or usage restrictions.
How accurate are the calculations?
The Matrix Calculator uses industry-standard formulas and algorithms to ensure accurate results. However, for critical financial or medical decisions, always consult a qualified professional.
How do I use the Matrix Calculator?
Simply enter your input in the provided field, adjust any settings to your preference, and the tool will process it instantly. You can then copy the result to your clipboard or download it.
Which browsers are supported?
The Matrix Calculator works in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. For the best experience, use the latest version of your preferred browser.
Why can't I multiply two matrices of any size together?
Matrix multiplication only works when the number of columns in the first matrix equals the number of rows in the second. So a 2x3 matrix can multiply a 3x4 matrix, because the inner dimensions (3 and 3) match, and the result is 2x4 — taking the outer dimensions. If those inner numbers disagree, the dot products between rows and columns aren't defined, and the operation is impossible. This is different from addition and subtraction, which instead require both matrices to be exactly the same shape. Multiplication is also not commutative: A×B and B×A usually give different answers, and B×A may not even be valid. When the dimensions don't line up, this calculator tells you exactly why rather than guessing. Enter your matrices, pick A×B, and it checks the shapes and computes the product up to 6x6 instantly.
What does it mean when a matrix is singular and has no inverse?
A square matrix is singular when its determinant equals zero, and a singular matrix has no inverse — there is no matrix you can multiply it by to get the identity. Geometrically, a singular matrix collapses space onto a lower dimension, so the transformation can't be undone; information is lost and can't be recovered. Only square matrices can have an inverse at all, and among those, exactly the ones with a non-zero determinant are invertible. A zero determinant also signals that the matrix's rows or columns are linearly dependent, meaning its rank is less than its size. This calculator computes the inverse by Gauss-Jordan elimination and, if it hits a zero pivot, stops and reports that the matrix is singular instead of returning garbage. Enter a square matrix and choose inverse to check invertibility directly.
How do I find the rank of a matrix using RREF?
The rank of a matrix is the number of linearly independent rows or columns it has, and reducing the matrix to reduced row echelon form (RREF) is the standard way to find it. In RREF, each leading entry is a 1 with zeros above and below it, and the rank is simply the count of non-zero rows that remain — equivalently, the number of pivot positions. Rows that reduce entirely to zero contribute nothing, signalling dependence among the original rows. Rank tells you how many independent equations a system really has, whether a set of vectors spans the space you expect, and whether a square matrix is full-rank and therefore invertible. This calculator does both: pick RREF(A) to see the reduced matrix, or rank(A) to get the number directly, for any matrix up to 6x6.
Why does this matrix calculator show answers as fractions like 1/3 instead of decimals?
Many matrix operations, especially inverses and RREF, produce values that aren't whole numbers, and rounding them to decimals introduces small errors that compound through later steps. A decimal like 0.3333 is really one-third truncated, so writing it as 1/3 keeps the value exact. This calculator detects clean rational results with small denominators (up to 16) and displays them as proper fractions instead of long decimals, which matches how textbooks and homework expect answers to look and makes it easy to compare against a hand calculation. Exact fractions are particularly valuable when you invert a matrix and want to verify that A times its inverse really returns the identity without floating-point drift. If a value isn't a clean fraction, it falls back to a decimal. Run an inverse or RREF here and read the exact fractional answer.
What is the trace of a matrix and what is it used for?
The trace of a square matrix is the sum of the entries on its main diagonal — top-left to bottom-right. For example, a matrix with diagonal entries 4, 1, and 7 has a trace of 12. Only square matrices have a trace, since non-square matrices don't have a complete main diagonal. Despite being a simple sum, the trace carries real meaning: it equals the sum of the matrix's eigenvalues, it stays the same under similarity transformations, and it appears throughout statistics, physics, and machine learning, for instance as the total variance in a covariance matrix. It's also a quick sanity check, since trace is unchanged by transposing a matrix. This calculator computes the trace of any square matrix up to 6x6 in one click — enter your matrix, select tr(A), and read the diagonal sum instantly.
Related Tools
Free Age Calculator Online
Calculate your exact age in years, months, and days with zodiac signs. Free, fast, and works entirely in your browser with no sign-up required.
Free Percentage Calculator
Calculate percentages easily with multiple calculation modes. Free, fast, and works entirely in your browser with no sign-up required.
Free Unit Converter Online
Convert between units of length, weight, temperature, area, volume, and speed. Free, fast, and works entirely in your browser with no sign-up required.
Free Byte Converter Online
Convert between digital storage units with binary and decimal systems. Free, fast, and works entirely in your browser with no sign-up required.
About the Matrix Calculator
The Matrix Calculator is a free linear-algebra workbench for two matrices at once. Enter the numbers for Matrix A and Matrix B, pick an operation, and the result appears instantly — addition, subtraction, multiplication, scalar multiplication, integer powers, transpose, determinant, inverse, trace, rank, and reduced row echelon form (RREF). Both matrices can be any shape from 1x1 up to 6x6, and for determinants and inverses you can switch on a full step-by-step breakdown of the work.
It's built for the people who actually live in matrices: students checking homework in a linear algebra course, engineers and data scientists sanity-checking a transformation, and anyone who needs a clean answer without firing up MATLAB, NumPy, or a graphing calculator. Everything runs in your browser, so there is no sign-up, no install, and nothing you type is uploaded to a server.
Operations you can run
- A+B and A−B — require both matrices to share the same dimensions, or the tool tells you why it can't.
- A×B (multiplication) — valid only when the columns of A equal the rows of B; the result takes the rows of A and columns of B.
- k×A (scalar) — multiply every entry of A by any number you choose.
- Aⁿ (power) — repeated multiplication of a square matrix; n must be a non-negative integer, and A⁰ returns the identity.
- Aᵀ and Bᵀ (transpose) — flip rows and columns; works on any shape.
- det(A), det(B) — determinant of a square matrix.
- A⁻¹, B⁻¹ (inverse) — the matrix that multiplies back to the identity, when it exists.
- tr(A) (trace) — the sum of the diagonal entries.
- rank(A) and RREF(A) — the number of independent rows and the matrix reduced to row echelon form.
How the step-by-step solver works
Toggle "Show step-by-step" before computing a determinant or inverse and the calculator shows its reasoning, not just the answer. Determinants are expanded by cofactors along the first row, recursing down to 2x2 blocks so you can follow each minor and sign. Inverses are solved by Gauss-Jordan elimination: the tool builds the augmented matrix [A | I], then logs every row swap, scaling, and elimination until the left side becomes the identity and the right side is A⁻¹. If a square matrix has a determinant of zero it is singular and has no inverse — the calculator catches this and says so rather than returning garbage.
Results are shown as exact fractions whenever the values are clean (denominators up to 16), so a result of one-third reads as 1/3 instead of 0.3333. You can copy any result as tab-separated text or as JSON, or download it as a plain-text file alongside the steps.
Why a matrix tool earns its keep
Matrices are the language of linear systems, computer graphics, statistics, and machine learning, and a single arithmetic slip propagates through every later step. A few facts worth keeping handy: only square matrices have a determinant, inverse, or trace; a matrix is invertible exactly when its determinant is non-zero; the rank tells you how many of its rows or columns are truly independent; and multiplication is not commutative, so A×B and B×A are usually different matrices. Use the tool to solve a system by computing A⁻¹, to confirm two matrices are inverses, to find the rank of a coefficient matrix, or simply to double-check a hand calculation before you submit it.
To work faster, each matrix has one-click buttons to fill it with zeros, ones, a random spread of integers (−10 to 10), or the identity, plus a Swap button to exchange A and B and a Reset to start clean. Set your dimensions, type your values, choose an operation, and read the answer.