Home / Blog / Math & Scientific

Math & Scientific

Find a Matrix Determinant: Two-by-Two and Three-by-Three

Calculate determinants with worked two-by-two and cofactor examples, check row-operation effects, and understand what zero and nonzero results imply.

Find a Matrix Determinant: Two-by-Two and Three-by-Three

Check that the matrix is square

A determinant is a number associated with a square matrix. The ordinary determinant calculation requires the same number of rows and columns, so a two-by-three array is not a valid input for this operation. Counting entries is not enough: six numbers could form several shapes, none of which is square. In the Determinant Calculator, put each row on a separate line and use a consistent number of entries. Preserve zeros and negative signs; they affect the result just as much as the larger positive numbers.

Start with the two-by-two rule

For rows a,b and c,d, the determinant is ad−bc. With rows 4,7 and 2,6, that is 4×6−7×2=24−14=10. The order of subtraction matters. Reversing it gives −10, and adding the two products gives 38; neither is the determinant of the entered matrix. A nonzero result means that this square matrix has an inverse. The determinant is not itself that inverse, nor is it the sum of the matrix's entries or the value of an unspecified system of equations.

Expand a three-by-three example along a row

Consider A with rows 1,2,3; 0,1,4; and 5,6,0. Expanding along the first row gives 1×(1×0−4×6)−2×(0×0−4×5)+3×(0×6−1×5). The three contributions are −24, +40 and −15, whose sum is 1. Notice the alternating plus, minus, plus signs outside the smaller determinants. The middle minor equals −20, and the additional negative cofactor sign turns −2×(−20) into +40. Losing either sign is a common reason this example is calculated incorrectly.

Use zeros to simplify a longer hand calculation

A cofactor expansion can use any row or column, so one containing several zeros often reduces the work. Another approach uses row operations to simplify the matrix. Adding a multiple of one row to another leaves its determinant unchanged. Swapping two rows reverses the sign, and multiplying one row by a factor multiplies the determinant by that factor. Keep a record of these operations rather than assuming every simplification preserves the answer. If elimination creates a triangular matrix, its determinant is the product of its diagonal entries, adjusted for any earlier swaps or scaling.

Apply a triangular cross-check

For an upper-triangular matrix with diagonal entries 2,−3 and 4, the determinant is 2×(−3)×4=−24 regardless of the entries above the diagonal. For example, rows 2,5,1; 0,−3,7; and 0,0,4 give −24. Swapping the first two rows changes the result to +24. Multiplying one row of the original triangular matrix by two changes it to −48. These small changes make useful checks that a calculator input has retained row order and that a hand calculation has accounted for a transformation correctly.

Interpret zero without inventing a system solution

A zero determinant indicates that a square matrix is singular. For rows 1,2 and 2,4, the second row depends on the first and the determinant is zero. If this matrix represents coefficients of equations, the associated system may be inconsistent or may have infinitely many solutions depending on its right-hand constants. The coefficient determinant alone does not distinguish those possibilities. A nonzero determinant establishes a unique solution for each right-hand column in exact arithmetic, but the actual solution still requires the constants and an additional calculation.

Compare the tool result with the stated problem

Enter the three-by-three worked matrix in the local determinant tool and expect 1; enter the triangular matrix and expect −24. The tool evaluates the supplied numerical matrix and formats the result for display. A tiny result rounded to zero should be interpreted with the input scale and numerical precision in mind, especially for nearly dependent rows. Do not add or remove entries simply to obtain a preferred sign. Retain the original matrix, its shape and a short independent check with the answer so the result remains traceable to the problem that was actually asked.

Use the Determinant Calculator

Open Determinant Calculator

Source and scope

MIT OpenCourseWare: matrix algebra and determinants