Matrix Determinant
Compute 2×2 and 3×3 determinants step by step · 행렬식 계산법
1. What Is a Determinant?
The determinant is a single number computed from a square matrix that summarizes how the matrix transforms space. Only square matrices (2×2, 3×3, n×n) have a determinant — a rectangular matrix has none. It is written det(A) or with vertical bars, |A|.
Despite being just one number, the determinant answers a surprising number of questions at once: it tells you whether a matrix is invertible (det ≠ 0), how much the matrix scales area or volume, and whether a system of linear equations Ax = b has a unique solution. That is why it shows up everywhere from computer graphics to solving equations by Cramer’s rule.
행렬식은 정사각 행렬에서 계산되는 하나의 숫자로, 그 행렬이 공간을 어떻게 변환하는지를 요약합니다. 직사각 행렬은 행렬식이 없습니다. 행렬식 하나로 가역성(det ≠ 0), 넓이·부피 배율, 연립방정식 해의 유일성을 동시에 판단할 수 있습니다.
2. The 2×2 Determinant: ad − bc
For a 2×2 matrix, the determinant is the product of the main diagonal minus the product of the anti-diagonal:
det [[a, b], [c, d]] = a·d − b·c
Worked example. For A = [[4, 7], [2, 6]]:
det(A) = (4 × 6) − (7 × 2) = 24 − 14 = 10
Because the result is non-zero, A is invertible. If the two columns were proportional — say [[2, 4], [1, 2]] — the determinant would be 2·2 − 4·1 = 0, signalling a singular (non-invertible) matrix.
2×2 행렬식은 주대각선 곱에서 반대각선 곱을 뺀 값, 즉 ad − bc 입니다. 예를 들어 A = [[4, 7], [2, 6]]이면 det(A) = 24 − 14 = 10 이고, 0이 아니므로 가역입니다. 두 열이 비례하면 행렬식은 0이 되어 특이(비가역) 행렬이 됩니다.
3. The 3×3 Determinant: Cofactor Expansion
For a 3×3 matrix, expand along the first row, alternating signs (+ − +). Each term is an entry times the 2×2 determinant of the matrix left after deleting that entry’s row and column (its minor):
det(A) = a₁₁(a₂₂a₃₃ − a₂₃a₃₂) − a₁₂(a₂₁a₃₃ − a₂₃a₃₁) + a₁₃(a₂₁a₃₂ − a₂₂a₃₁)
Worked example. For A = [[1, 2, 3], [4, 5, 6], [7, 8, 10]]:
- 1 × (5·10 − 6·8) = 1 × (50 − 48) = 2
- − 2 × (4·10 − 6·7) = − 2 × (40 − 42) = +4
- 3 × (4·8 − 5·7) = 3 × (32 − 35) = −9
det(A) = 2 + 4 − 9 = −3
The sign of each cofactor follows the checkerboard pattern, and you can expand along any row or column — choose the one with the most zeros to minimise arithmetic.
3×3 행렬식은 한 행(또는 열)을 기준으로 부호를 +, −, + 로 번갈아 가며 여인수 전개합니다. 각 항은 해당 원소 × (그 행과 열을 지운 2×2 소행렬식)입니다. 위 예제는 det(A) = 2 + 4 − 9 = −3 입니다. 0이 가장 많은 행이나 열을 고르면 계산이 줄어듭니다.
4. What the Determinant Tells You
- Invertibility. A is invertible if and only if det(A) ≠ 0. When det(A) = 0 the matrix is singular: its columns are linearly dependent and Ax = b has either no solution or infinitely many.
- Geometry. |det(A)| is the factor by which the matrix scales area (2D) or volume (3D). A determinant of 10 means areas are stretched ten-fold; a determinant of 0 collapses space onto a line or point.
- Orientation. A positive determinant preserves orientation (like a rotation); a negative one flips it (like a reflection).
- Useful identities. det(AB) = det(A)·det(B) and det(Aᵀ) = det(A). For triangular matrices the determinant is simply the product of the diagonal entries.
For large matrices, never use cofactor expansion (its cost grows like n!). Instead reduce to triangular form with LU decomposition and multiply the pivots — an O(n³) operation that scales to thousands of rows.
det(A) ≠ 0이면 가역, det(A) = 0이면 특이(비가역)입니다. 행렬식의 절댓값은 넓이(2D)·부피(3D)의 배율이고, 부호는 방향 보존(+) 또는 뒤집힘(−)을 뜻합니다. det(AB) = det(A)det(B), det(Aᵀ) = det(A)가 성립합니다. 큰 행렬은 여인수 전개 대신 LU 분해로 O(n³)에 계산합니다.
5. Frequently Asked Questions
What does a determinant of 0 mean? The matrix is singular — non-invertible. Its rows/columns are linearly dependent, it squashes space into a lower dimension, and the system Ax = b has no unique solution.
Can a non-square matrix have a determinant? No. Determinants are defined only for square matrices. Rectangular matrices instead use related ideas such as rank or the pseudo-inverse.
What is the fastest way to compute a large determinant? Use LU decomposition and take the product of the pivots (up to a sign from row swaps). This is O(n³), whereas naïve cofactor expansion is O(n!) and becomes impossible beyond a handful of rows.
행렬식이 0이면 비가역(특이) 행렬로, Ax = b의 해가 유일하지 않습니다. 직사각 행렬은 행렬식이 없으며 대신 계수(rank)나 유사역행렬을 씁니다. 큰 행렬은 LU 분해로 피벗의 곱을 구하는 것이 가장 빠릅니다.
Ready to practice? Drill determinants and the rest of linear algebra on C:Matrix, or review the full matrix reference and the closely related inverse matrix (which exists only when the determinant is non-zero).
실전 연습은 C:Matrix에서, 전체 개념은 행렬 레퍼런스와 행렬식이 0이 아닐 때만 존재하는 역행렬 문서에서 이어집니다.