Matrices and Basic Operations
A matrix is a rectangular array of numbers arranged in rows and columns. An matrix has rows and columns. They compactly represent linear systems, transformations, and data tables.
| Operation | Rule | Shape Requirement |
|---|---|---|
| Addition | Add entry by entry | Same shape () |
| Scalar Multiplication | Multiply every entry by a scalar | Any shape |
The identity matrix has ones on the diagonal and zeros elsewhere, acting like the number 1 so that . A square matrix may have an inverse where , though not all matrices are invertible.
Matrix Multiplication & Transformations
The product is defined only when the number of columns of equals the number of rows of . An times an matrix yields an result. Entry is the dot product of row of and column of .
Matrix multiplication is not commutative: in general , though it is associative . This odd rule matters because a matrix represents a linear transformation, and multiplying matrices composes those transformations in sequence.
Common pitfall: Never multiply matrices entry-by-entry. Always use the dot product of a row and a column, and verify that shapes match.