Matrix Determinant Calculator
Find the determinant of a square real matrix from 1×1 to 8×8 in exact fractions. This page selects det A; the opening [1 2; 3 4] gives -2 unless a saved matrix restores. Fill grid A or apply pasted rows. [1/2 1/3; 1/4 1/5] gives 1/60, and [1 2 3; 4 5 6; 7 8 9] gives exactly 0 with rank 2. Rectangular matrices have no ordinary determinant; the page explains their shape rather than inventing a value. Copy the result as text or LaTeX.
- Display
The scale factor of the matrix. Zero means the matrix is singular and has no inverse.
Paste a whole matrix
Use one row per line or semicolon. Separate entries with spaces, tabs or commas; write fractions as 1/3. Brackets around each row are optional. Applying a matrix replaces that grid and its dimensions.
Computed by Bareiss elimination in exact rational arithmetic, so nothing here is rounded.
Common questions
- How do I find the determinant of a 2×2 matrix?
- Type the four numbers into grid A and read the large number to the right of the equals sign. The rule is ad − bc, the product of the main diagonal less the product of the other one. The page opens on [1 2; 3 4], where that is 1×4 − 2×3, so the answer on screen is -2. Put [4 7; 2 6] in instead and it is 24 − 14, or 10. A cell takes a whole number, a decimal like 0.5, a fraction like 1/3, exponent notation like 1.5e1, or the long minus sign that comes with anything pasted out of a PDF or a textbook, and a cell left blank counts as zero.
- How does it work out a 3×3 or an 8×8 determinant?
- The calculator uses exact Bareiss elimination, with row swaps accounted for in the sign. The row and column controls support 1×1 through 8×8. [6 1 1; 4 -2 5; 2 8 7] gives -306; [2 -1 0 0; -1 2 -1 0; 0 -1 2 -1; 0 0 -1 2] gives 5. It displays the finished determinant rather than a cofactor expansion or intermediate elimination steps.
- What does a determinant of 0 mean?
- The square matrix is singular and has no ordinary inverse. Its rows are dependent; Rank of A reports their independent count. [1 2 3; 4 5 6; 7 8 9] has determinant 0 and rank 2, and [1 2; 1 2] has determinant 0 and rank 1. Exact arithmetic reaches zero without relying on a numerical tolerance.
- Why is my determinant showing as a fraction?
- Because it is one. Fractions in give a fraction out: [1/2 1/3; 1/4 1/5] gives 1/60, and the 3×3 Hilbert matrix [1 1/2 1/3; 1/2 1/3 1/4; 1/3 1/4 1/5] gives 1/2160 exactly. Decimals you type are converted exactly on the way in as well, so [0.5 1.5; 2 4] gives -1 rather than something ending in stray digits. When a decimal is what you need, the Display switch under the stage turns the same exact value into one at 0 to 10 places on the stepper: 1/2160 reads 0.0005 at four places and 0.000462963 at ten, while the value behind it is still exactly 1/2160.
- Can I take the determinant of a rectangular matrix?
- An ordinary determinant is defined only for a square matrix. A 2×3, 3×4 or 4×3 matrix is refused with its exact shape and a suggestion to give A equal rows and columns. Rank and RREF still work for rectangles: [1 2 3; 4 5 6] has rank 2 and RREF [1 0 -1; 0 1 2]. This explanation does not claim to define a rectangular determinant.
- Does swapping or scaling a row change the determinant?
- Yes, in fixed ways, and retyping a matrix here is the quickest way to watch them. Swapping two rows flips the sign: [6 1 1; 4 -2 5; 2 8 7] is -306, and with its last two rows exchanged it is 306. Multiplying one row by k multiplies the determinant by k: double the first row of that same matrix and it becomes -612. Adding a multiple of one row to another leaves the determinant alone, which is exactly why elimination can be used to compute it. A triangular matrix is the easy case, since the answer is the product of its diagonal: [2 0 0; 5 3 0; 9 8 4] is 2 × 3 × 4, or 24.
- Does opening this page change the calculator I use for other operations?
- The page selects its stated operation after saved restoration. Simply visiting it does not overwrite the saved draft. Only fields you deliberately edit update their stored values; changing a display preference does not save a preset matrix. Everything is computed in your browser.
Exact: matrices are computed in rational arithmetic, so an inverse of an integer matrix is shown as fractions rather than rounded decimals, and a singular matrix is reported as singular instead of producing huge numbers.