Matrix Calculator for Every Linear Algebra Operation
This matrix calculator solves the operations you reach for most in linear algebra: add, subtract, multiply, transpose, determinant, inverse, scalar multiplication, and matrix power. Type your numbers into the grid, pick an operation, and read the answer instantly.
It is built for students working through homework and for anyone who needs a fast, accurate matrix solver. Handle anything from a quick 2×2 up to a 10×10, show results as decimals or exact fractions, and feed any answer back in as Matrix A to chain calculations.
How to Use the Matrix Calculator
Choose an operation
Pick an operation from the bar at the top. Two Matrices covers A + B, A − B, and A × B; Single Matrix covers transpose (Aᵀ), determinant det(A), inverse (A⁻¹), scalar multiplication (k·A), and power (Aⁿ).
Set the matrix size
Click a preset (2×2, 3×3, or 4×4) for a common shape, or use the +/− controls to set rows and columns individually, anywhere from 1 to 10.
Enter your values
Type a number into any cell, or paste a whole block straight from Excel or another spreadsheet. The Quick fill buttons drop in an identity matrix, random values, all zeros, or all ones. Empty cells count as zero.
Calculate and reuse the result
Click Calculate or press Enter. Toggle Fractions to see exact values, Copy result to the clipboard, or Use as A to load the answer back into Matrix A for the next step.
Features
Addition & Subtraction
Add or subtract two matrices of the same dimensions, combining corresponding elements one by one.
Matrix Multiplication
Multiply A × B when A's columns equal B's rows. The result takes the shape A rows × B columns.
Transpose
Flip rows into columns so an m×n matrix becomes n×m, with a single tap.
Determinant
Compute det(A) for any square matrix to test whether it is invertible or singular.
Inverse
Find A⁻¹ by Gauss-Jordan elimination for any square matrix with a non-zero determinant.
Scalar Multiplication
Multiply every element by a constant k, using a preset value or any number you type.
Matrix Power
Raise a square matrix to a non-negative integer power; power 0 returns the identity, power 1 the original.
Flexible Sizing
Build matrices from 1×1 up to 10×10 with preset shapes or individual row and column steppers.
Paste from Spreadsheets
Copy a block from Excel and paste it in; the grid parses the values and resizes itself to fit.
Quick Fill
Generate an identity, random, all-zeros, or all-ones matrix instantly, plus a one-click clear.
Swap A ↔ B
Exchange Matrix A and Matrix B, values and dimensions included, with a single button.
Fraction Display
Toggle results between decimals and exact fractions to read precise values at a glance.
Chain Calculations
Send any matrix result back into Matrix A with Use as A, so multi-step work needs no retyping.
Dimension Warnings & Sync
Mismatched sizes trigger a clear warning and a Sync button that resizes Matrix B to match the operation.
Keyboard Navigation
Move between cells with the arrow keys and Tab, then press Enter to calculate without the mouse.
Dark Mode
A built-in dark theme keeps the grid comfortable to read in any lighting.
Frequently Asked Questions
How do you multiply two matrices?
Select A × B, then make sure the number of columns in Matrix A equals the number of rows in Matrix B. For example, a 2×3 matrix multiplies with a 3×4 matrix to give a 2×4 result. The calculator multiplies each row of A by each column of B and sums the products for you.
How do you find the inverse of a matrix?
Choose A⁻¹ with a square matrix whose determinant is not zero. The tool uses Gauss-Jordan elimination to return the inverse, which gives the identity matrix when multiplied by the original. If the determinant is zero, the matrix is singular and has no inverse.
How do you calculate a determinant?
Pick det(A) on a square matrix. The calculator computes 2×2 determinants directly and uses LU decomposition for larger sizes, returning a single scalar value. A non-zero determinant means the matrix is invertible; a zero determinant means it is singular.
What is the transpose of a matrix?
The transpose, written Aᵀ, swaps rows and columns: the first row becomes the first column, and so on. A matrix of size m×n becomes n×m. Select Aᵀ to transpose any matrix, square or rectangular.
What does "singular matrix" mean?
A singular matrix has a determinant of zero and cannot be inverted. This happens when its rows or columns are linearly dependent — for instance, when one row is a multiple of another. If you try to invert a singular matrix, the calculator shows a clear message instead of a result.
What is the largest matrix I can use?
You can build matrices up to 10×10. Use the 2×2, 3×3, and 4×4 presets for common shapes, or the +/− controls to set any rows and columns between 1 and 10.
Can I paste matrix data from Excel?
Yes. Copy a block of cells from Excel or any spreadsheet, click the starting cell in the grid, and paste. The calculator parses tab-, space-, or comma-separated values and grows the grid as needed to fit your data.
How does the fraction display work?
Toggle the Fractions switch to convert decimal results into exact fractions — 0.5 becomes 1/2, and a repeating 0.333… becomes 1/3. This is handy for inverse and scalar results where exact values matter more than rounded decimals.
Is my data saved or uploaded anywhere?
No. Every calculation runs entirely in your browser. Your matrix values never leave your device and are not stored or transmitted to any server.
No comments yet. Be the first to comment!