Foundations of Linear Algebra
Vectors and Matrices
Vectors: Beyond Direction
Vectors are more than just arrows pointing in space. They're ordered lists of numbers that represent a point in a coordinate system or a magnitude and direction. We typically write them as a column.
We can perform basic arithmetic with vectors. When we add or subtract vectors, we do it component by component. The vectors must have the same number of dimensions for this to work.
For example, let's add two vectors:
Another key operation is scalar multiplication. This involves multiplying a vector by a single number (a scalar). The result is a new vector that's been scaled, or stretched. Each component of the vector is multiplied by the scalar.
If you multiply the vector from our first example by the scalar 3, you get a new vector pointing in the same direction but three times as long.
Matrices: Organized Data
A matrix is a rectangular grid of numbers arranged in rows and columns. They're a powerful way to organize data and, as we'll see later, to perform complex transformations on vectors.
The size or dimension of a matrix is given by its number of rows and columns. We say a matrix with m rows and n columns is an matrix.
Just like with vectors, we can add and subtract matrices. The rule is the same: the matrices must have the exact same dimensions, and the operation is performed element by element.
Scalar multiplication also works the same way. Multiply every element in the matrix by the scalar.
Matrix Multiplication
Matrix multiplication is where things get more interesting. Unlike addition, it is not performed element by element. For two matrices to be multiplied, the number of columns in the first matrix must equal the number of rows in the second matrix.
If you multiply an matrix by an matrix, the result will be an matrix.
To find the element in the i-th row and j-th column of the resulting matrix, you take the dot product of the i-th row of the first matrix with the j-th column of the second matrix.
One of the most important properties of matrix multiplication is that it's not commutative. In general, . The order matters!
Let's check your understanding of these fundamental operations.
What is the result of adding the vectors and ?
What happens when you multiply a vector by a scalar (a single number)?
With these basics of vector and matrix arithmetic, we have the building blocks for exploring the more powerful aspects of linear algebra.

