How to work with matrices
Choose 2×2 or 3×3 and fill every cell, including zeros. Addition and subtraction use corresponding positions. For multiplication, each output cell combines a row of A with a column of B: Cᵢⱼ = Σ AᵢₖBₖⱼ.
Single-matrix operations only use A. Transposition swaps rows and columns. The determinant returns a number; for 2×2 it is ad − bc. An inverse, when it exists, satisfies A × A⁻¹ = I.
Step-by-step example
The initial matrices are A = [[1, 2], [3, 4]] and B = [[5, 6], [7, 8]]. For A × B:
| Cell | Calculation | Result |
|---|---|---|
| Row 1, column 1 | 1 × 5 + 2 × 7 | 19 |
| Row 1, column 2 | 1 × 6 + 2 × 8 | 22 |
| Row 2, column 1 | 3 × 5 + 4 × 7 | 43 |
| Row 2, column 2 | 3 × 6 + 4 × 8 | 50 |
Therefore, A × B = [[19, 22], [43, 50]]. The determinant of A is 1 × 4 − 2 × 3 = −2. Its inverse is [[-2, 1], [1.5, -0.5]].
Precision and singular matrices
The inverse uses Gauss–Jordan elimination with pivot selection. A matrix with zero determinant has no inverse. The tool also rejects very small pivots because rounding could produce an unreliable inverse. Operations do not mutate the original inputs. Results use up to ten significant digits.
Source
OpenStax: matrices and matrix operations explains addition, multiplication and dimensions. To solve an individual linear or quadratic equation, use the equation calculator.
Frequently asked questions
A square matrix has an inverse if its determinant is nonzero. This tool also rejects numerically unstable matrices.
Not necessarily. In general, matrix multiplication is not commutative.