BMI 計算機
加算、減算、乗算、転置、行列式、逆行列などの行列演算を、ステップバイステップの計算過程とともに実行します。
このツールについて
行列サイズ(2×2、3×3、または4×4)を選択し、行列Aと行列BのグリッドセルにInputください。演算を選択してください:加算、減算、乗算、転置、行列式、または逆行列。結果はフォーマットされた行列グリッドとして表示されます。行列式と逆行列については、ツールが各ステップをたどれるよう余因子展開の計算過程を表示します。特異行列、非互換サイズ、非正方入力のエラーが明確に報告されます。
使い方
- 1 サイズセレクターから行列サイズ(2×2、3×3、または4×4)を選択してください。
- 2 行列Aのグリッドに値を入力してください。演算に2つの行列が必要な場合は行列Bも入力してください。
- 3 演算を選択してください:加算、減算、乗算、転置、行列式、または逆行列。
- 4 「計算」をクリックして結果行列を確認してください。行列式/逆行列の場合はステップバイステップの計算過程も表示されます。
What a matrix calculator does
A matrix is a grid of numbers, and matrix algebra is the engine behind 3D graphics, machine learning, physics simulations, economics, and any system of linear equations. This calculator works with square matrices of size 2×2, 3×3, or 4×4 and performs the core operations: addition, subtraction, multiplication, transpose, determinant, and inverse. You fill the grids with numbers (decimals allowed), pick an operation, and it computes the result entirely in your browser. For the determinant and inverse it also shows step-by-step working so you can check the method, not just the answer.
How each operation actually works
Addition and subtraction are element-wise: the entry in row i, column j of the result is simply A[i][j] ± B[i][j]. Both matrices must be the same size, which is why this tool keeps A and B identical in dimension.
Multiplication is the operation people get wrong, because it is not element-wise. Each result entry is a dot product of a row of A with a column of B: result[i][j] = Σ A[i][k] × B[k][j] over all k. This makes matrix multiplication non-commutative — A×B generally does not equal B×A — and it's why the order you enter the matrices matters.
Transpose flips the matrix over its diagonal: rows become columns, so the entry at (i, j) moves to (j, i).
Determinant is computed by cofactor expansion along the first row. For a 2×2 it's the familiar ad − bc. For larger matrices the tool recursively breaks the problem into smaller "minor" matrices, multiplying each first-row entry by the determinant of the submatrix left after deleting its row and column, with alternating + and − signs.
Inverse uses the adjugate method: A⁻¹ = adj(A) / det(A), where the adjugate is the transposed matrix of cofactors. If the determinant is zero (technically, within a tiny tolerance of zero) the matrix is singular and has no inverse — the tool reports this rather than returning nonsense.
A worked example: 2×2 determinant and inverse
Take the matrix A = [[4, 7], [2, 6]].
- Determinant: det(A) = (4 × 6) − (7 × 2) = 24 − 14 = 10. Since it's non-zero, an inverse exists.
- Inverse: for a 2×2 you swap the diagonal entries, negate the off-diagonal, and divide by the determinant:
A⁻¹ = (1/10) × [[6, −7], [−2, 4]] = [[0.6, −0.7], [−0.2, 0.4]].
You can verify the result by multiplying A × A⁻¹ in the tool — it should return the identity matrix [[1, 0], [0, 1]], give or take tiny floating-point rounding.
Common use cases
- Solving linear systems. A set of simultaneous equations written as Ax = b is solved by x = A⁻¹b; the inverse and determinant are the heart of that.
- Computer graphics. 4×4 matrices represent translation, rotation, and scaling of 3D objects; multiplying them chains transformations.
- Checking homework. Compute the answer here, then compare with your hand calculation — the step display makes it a study aid, not just a black box.
- Engineering and statistics. Covariance matrices, transformation matrices, and Markov transition matrices all rely on these operations.
Tips and common mistakes
- Multiplication order is not interchangeable. A×B ≠ B×A in general. Decide which matrix is the "transformation" and which is the "input," and put them in that order.
- A zero determinant means no inverse. Geometrically, the matrix collapses space onto a lower dimension, so it can't be undone. If you see the "singular" error, your rows or columns are linearly dependent (one is a combination of the others).
- Watch floating-point noise. Inverses and chained operations can leave values like
0.9999998instead of1. The display rounds for readability, but expect tiny residue when you verify results. - Empty cells count as zero. Blank inputs are read as 0, so an unfilled entry silently changes your answer — fill every cell deliberately.
- Determinant only for square matrices. All operations here use square matrices, which is correct: determinant and inverse are undefined for non-square matrices, and multiplication of non-square matrices requires matching inner dimensions.
- Transpose ≠ inverse. A beginner trap is treating the transpose as an inverse. They're equal only for special (orthogonal) matrices; in general they're entirely different results.