A matrix is a rectangular array of numbers arranged in rows and columns. We describe its size as m × n (m rows, n columns). Matrices let us represent and solve systems of equations, transform coordinates, and model real-world engineering problems compactly.
Rows × ColumnsElements / entriesSquare matrixIdentity matrix I
Types of matrix
Row matrix — 1 × n e.g. [372]
Column matrix — m × 1 e.g. [419]
Square matrix — m = n e.g. 2×2, 3×3
Zero matrix — all entries are 0
Identity I — 1s on diagonal, 0s elsewhere
Identity matrix
The identity matrix I is the matrix equivalent of 1 — any matrix multiplied by I gives itself: A × I = A
I₂ = [1001]
I₃ = [100010001]
➕
Matrix Addition & Subtraction
Rule: matrices must be the same size. Add or subtract the corresponding elements — same row, same column.
A + B: (A+B)ᵢⱼ = Aᵢⱼ + Bᵢⱼ A − B: (A−B)ᵢⱼ = Aᵢⱼ − Bᵢⱼ Sizes must match!
🎮 Interactive — edit any cell, watch the result update live
Enter values in Matrix A and B above — result updates instantly.
👆Try Switch to 3×3 using the size button · Click Subtract A−B to flip the operation · Make A = B then subtract — every element becomes zero!
Worked example — 2×2 addition
A + B where A=[1234]and B=[5678]
Position (1,1):1 + 5 = 6
Position (1,2):2 + 6 = 8
Position (2,1):3 + 7 = 10
Position (2,2):4 + 8 = 12
Result:[681012] ✓
Key rules
✅ Same size → can add/subtract
❌ Different sizes → NOT possible
A + B = B + A (commutative)
(A + B) + C = A + (B + C) (associative)
💡 Scalar multiplication: 3A means multiply every element by 3
✖️
Matrix Multiplication
Each result cell Cij = Row i of A dotted with Column j of B. The guide below shows you one cell at a time.
Rule: A (m×n) × B (n×p) → result C (m×p). Inner dimensions must match. A×B ≠ B×A in general.
MATRIX A
×
MATRIX B
=
RESULT C
Press Start Guided Tour to walk through the multiplication cell by cell.
DOT PRODUCT BREAKDOWN
👆Press ▶ Start Guided Tour to walk through each cell one at a time · Try 3×3 mode · Edit any cell and press Start again to see your own multiplication worked out.
Worked: 2×2
A=[3213]× B=[124−6]
C11:Row1·Col1 = 3×1+2×4 = 11
C12:Row1·Col2 = 3×2+2×(−6) = −6
C21:Row2·Col1 = 1×1+3×4 = 13
C22:Row2·Col2 = 1×2+3×(−6) = −16
C =[11−613−16] ✓
Key rules
A(m×n) × B(n×p) → C is m×p
A×B ≠ B×A (not commutative)
2×2 × 3×2? → Cols of A ≠ Rows of B → ❌ Impossible
A×(B+C) = A×B + A×C (distributive)
💡 A×B is possible only when the inner numbers match: A(m×n) × B(n×p)
🔢
Determinant
The determinant is a single number from a square matrix. For 2×2: det = ad − bc. For 3×3 expand along row 1. If det = 0 the matrix has no inverse.