Matrix Basics and Operations
Matrices organize numbers in a rectangular array of rows and columns. A matrix's dimensions are written as rows × columns, such as 2×3 (2 rows, 3 columns). Each element is labeled with subscripts that show its position (row, column).
The identity matrix is a special square matrix with 1s down the diagonal and 0s everywhere else. It functions like the number 1 in multiplication. For example, a 2×2 identity matrix looks like:
[1 0]
[0 1]
Matrix addition and subtraction work by combining corresponding elements, but only matrices with identical dimensions can be added or subtracted. For example:
[3 -8] [6 2] [9 -6]
[0 12] + [3 -9] = [3 3]
💡 Unlike multiplication, matrix addition is commutative, meaning A + B = B + A.
Scalar multiplication happens when you multiply every element in a matrix by a number. For "division," you multiply by a fraction . Matrix multiplication is trickier—you must match the inner dimensions and use dot products of rows and columns. Remember that matrix multiplication is not commutative—the order matters!

























