途中式付き行列式計算機:ステップ別計算過程と詳細解法
行基本変形、余因子展開、サラスの公式の計算過程をすべて表示するステップ付き行列式計算ツール。
Direct Answer / AI Overview: A determinant calculator with steps displays the complete intermediate mathematical operations required to find a matrix determinant. The four core step-by-step methods are:
- Laplace Cofactor Expansion: Expands sub-matrix minors ($M_{ij}$) multiplied by alternating signs $(-1)^{i+j}$.
- Gaussian Row Reduction: Applies elementary row operations to transform the matrix into an upper triangular form $U$, where $\det(A) = (-1)^{\text{swaps}} \prod u_{ii}$.
- LU Decomposition: Factorizes $PA = LU$ into lower and upper triangular components in $O(n^3)$ time.
- Sarrus’ Rule: Visual diagonal multiplication method exclusive to $3\times 3$ matrices.
When learning linear algebra or checking homework, getting only a single numeric scalar from a calculator is not enough. You need the complete step-by-step working showing minor expansions, intermediate row transformations, and sign adjustments.
Our free online Determinant Solver calculates determinants for matrices from $2\times 2$ up to $6\times 6$ with instantaneous results. In this guide, we break down each major computational method step-by-step so you can master both manual exams and computer implementations.
The 4 Step-by-Step Determinant Algorithms
┌────────────────────────┐
│ Determinant Algorithms │
└───────────┬────────────┘
┌──────────────────┬─────────┴─────────┬──────────────────┐
│ │ │ │
┌────────┴─────────┐ ┌──────┴──────────┐ ┌──────┴──────────┐ ┌─────┴──────────┐
│ Laplace Minors │ │ Row Reduction │ │ LU Factorization│ │ Sarrus (3x3) │
│ O(n!) - Symbolic │ │ O(n³) - Manual │ │ O(n³) - Software│ │ O(1) - Fast │
└──────────────────┘ └─────────────────┘ └─────────────────┘ └────────────────┘
Method 1: Laplace Cofactor Expansion (Step-by-Step)
Laplace expansion expresses the determinant as a weighted sum of smaller $(n-1)\times(n-1)$ sub-determinants along any row or column.
Mathematical Formula:
$$\det(A) = \sum_{j=1}^{n} a_{ij} C_{ij} = \sum_{j=1}^{n} a_{ij} (-1)^{i+j} \det(M_{ij})$$
Step-by-Step Process:
- Choose the Best Row/Column: Select the row or column containing the greatest number of zeros to eliminate sub-calculations.
- Determine the Sign Matrix: Apply the checkerboard sign pattern $(-1)^{i+j}$: $$\begin{bmatrix} + & - & + & - \ - & + & - & + \ + & - & + & - \ - & + & - & + \end{bmatrix}$$
- Extract Minors ($M_{ij}$): For each entry, cross out its corresponding row and column to form the smaller sub-matrix.
- Calculate Minor Determinants: Evaluate each $(n-1)\times(n-1)$ determinant.
- Multiply and Sum: Multiply each entry by its sign and minor, then add them together.
Method 2: Gaussian Row Reduction (Upper Triangular Form)
For matrices larger than $3\times 3$, Laplace expansion requires too many operations ($n!$). Gaussian row reduction reduces the matrix to Upper Triangular form where all entries below the main diagonal are zero.
The Key Theorem:
The determinant of an upper or lower triangular matrix is the product of its diagonal entries: $$\det(U) = u_{11} \cdot u_{22} \cdot u_{33} \cdots u_{nn}$$
Step-by-Step Row Operation Rules:
- Row Swap ($R_i \leftrightarrow R_j$): Multiplies determinant by $-1$.
- Row Scaling ($k R_i \to R_i$): Multiplies determinant by $k$.
- Row Addition ($R_i + c R_j \to R_i$): Leaves determinant completely unchanged.
Step-by-Step Worked Example:
Find $\det(A)$ using row reduction:
$$A = \begin{bmatrix} 2 & 4 & 2 \ 1 & 5 & 3 \ 4 & 1 & 2 \end{bmatrix}$$
- Step 1: Create zero in row 2 ($R_2 \to R_2 - 0.5 R_1$): $$R_2 = [1, 5, 3] - 0.5[2, 4, 2] = [0, 3, 2]$$
- Step 2: Create zero in row 3 ($R_3 \to R_3 - 2 R_1$): $$R_3 = [4, 1, 2] - 2[2, 4, 2] = [0, -7, -2]$$ $$A’ = \begin{bmatrix} 2 & 4 & 2 \ 0 & 3 & 2 \ 0 & -7 & -2 \end{bmatrix}$$
- Step 3: Eliminate entry in row 3, column 2 ($R_3 \to R_3 + \frac{7}{3} R_2$): $$R_3 = [0, -7, -2] + \frac{7}{3}[0, 3, 2] = \left[0, 0, -2 + \frac{14}{3}\right] = \left[0, 0, \frac{8}{3}\right]$$ $$U = \begin{bmatrix} 2 & 4 & 2 \ 0 & 3 & 2 \ 0 & 0 & \frac{8}{3} \end{bmatrix}$$
- Step 4: Multiply diagonal elements: $$\det(A) = 2 \times 3 \times \frac{8}{3} = 16$$
Method 3: LU Decomposition with Partial Pivoting
Modern numerical linear algebra engines—including Determinant Solver—use LU Decomposition with Partial Pivoting ($PA = LU$).
[ P ] · [ A ] = [ L ] · [ U ]
- $P$: Permutation matrix recording row swaps (with $\det(P) = (-1)^S$, where $S$ is swap count).
- $L$: Unit lower triangular matrix with 1s on the diagonal ($\det(L) = 1$).
- $U$: Upper triangular matrix.
$$\det(A) = (-1)^S \cdot \prod_{i=1}^{n} u_{ii}$$
This approach avoids division by near-zero pivots, ensuring floating-point accuracy up to 12 decimal places. Learn the deep math in our LU Decomposition Determinant Guide.
Algorithm Performance Comparison
| Matrix Dimension | Laplace Expansion Operations ($O(n!)$) | LU Decomposition / Gaussian ($O(n^3)$) | Recommended Method |
|---|---|---|---|
| $2\times 2$ | 2 operations | 4 operations | $ad - bc$ formula |
| $3\times 3$ | 6 operations | 18 operations | Sarrus Rule or Minors |
| $4\times 4$ | 24 operations | 43 operations | Row Reduction / LU |
| $5\times 5$ | 120 operations | 83 operations | LU Decomposition |
| $6\times 6$ | 720 operations | 144 operations | LU Decomposition |
Frequently Asked Questions (FAQ)
How can I calculate a determinant step-by-step for free?
You can use our online determinant calculator with steps to enter any matrix from $2\times 2$ to $6\times 6$. It computes determinants using LU decomposition with customizable precision and provides clear intermediate steps.
Why is row reduction faster than cofactor expansion?
Cofactor expansion has a factorial time complexity $O(n!)$, meaning a $5\times 5$ matrix requires evaluating 120 separate products. Gaussian row reduction operates in polynomial time $O(n^3) \approx 125$ basic arithmetic operations, making it thousands of times faster for larger matrices.
Does swapping rows change the determinant?
Yes. Every time you swap two rows in a matrix, the determinant is multiplied by $-1$. If you make an even number of swaps, the overall sign remains unchanged.
Need additional tools?
Explore our complete collection of SEO software, AI tools, business applications, calculators and converters.
Related Resources
Hand-picked web applications and engineering utilities from our network
- • InstantSEOScan – Analyze your website health and uncover ranking bottlenecks with advanced SEO audit tools. AI-powered SEO auditing tools .
- • DentalLeadCRM – Streamline patient scheduling and automate lead management for dental practices. patient management software .
- • JPEGtoSVG – Convert raster PNG and JPEG images into clean, scalable SVG vector graphics. vector converter .
- • Backlink Platform – Publish your site to curated backlink sources and improve organic domain authority. build backlinks .
- • Shahab Dev – Build tailored web applications, enterprise SaaS, CRM solutions, and AI automations. custom software development .