Part 1: Basic Ideas of Linear Algebra
1.1 Linear Combinations of Vectors
A vector in is an ordered list of real numbers, written as a column:
A linear combination of vectors is formed by multiplying each vector by a scalar and adding the results:
Key insight: Every linear combination of vectors stays within the same space . The set of all possible linear combinations of a collection of vectors is called their span.
Example in : The vectors and span all of because any vector can be written as .
1.2 Dot Products and Lengths and Angles
The dot product (also called inner product or scalar product) of two vectors in is:
Length (norm) of a vector:
This is the Euclidean distance from the origin to the point , by Pythagoras in dimensions.
Angle between two vectors:
Schwarz Inequality (Cauchy-Schwarz):
Equality holds when and are parallel (one is a scalar multiple of the other).
Perpendicular (Orthogonal) Vectors: iff . For perpendicular vectors, the Pythagorean theorem gives:
Unit vectors have length . To normalize any nonzero vector, divide by its length: .
1.3 Matrices Multiplying Vectors
A matrix of size multiplies a vector to produce .
Two ways to view :
Row way (dot product): Each row of takes the dot product with to produce one component of :
Column way (linear combination): is a linear combination of the columns of , with coefficients from :
The Identity Matrix: for all . has 1's on the diagonal and 0's elsewhere.
Example:
The column way is fundamental: it tells us that always lies in the column space of .
1.4 Column Space and Row Space of
Column Space : The set of all linear combinations of the columns of . Equivalently, .
- is a subspace of (each column has components).
- The column space contains all possible outputs for which has a solution.
- The rank is the dimension of , i.e., the number of independent columns.
Row Space : The set of all linear combinations of the rows of . Equivalently, the column space of .
- The row space is a subspace of (each row has components).
- The dimension of the row space also equals (the rank).
Key Fact: The column space and row space have the same dimension , even though they live in different ambient spaces ( vs ).
1.5 Dependent and Independent Columns
A set of vectors is linearly dependent if one vector can be written as a combination of the others. Equivalently, there exist scalars , not all zero, such that:
A set is linearly independent if the only solution to the above equation is .
For columns of a matrix :
- Dependent columns: for some nonzero . At least one free variable exists.
- Independent columns: only when . Every variable is a pivot variable.
For square matrices: If columns are independent, then rows are also independent (and vice versa). The matrix is invertible.
Rank = number of independent columns = number of independent rows = dimension of = dimension of .
1.6 Matrix-Matrix Multiplication
There are four equivalent ways to multiply matrices (size ) and (size ) to get (size ):
1. Dot products of rows of with columns of :
2. times columns of : Each column of is times the corresponding column of :
3. Rows of times : Each row of is the corresponding row of times .
4. Column times row (outer product):
Each term is an rank-one matrix.
Associative Law: , which is the foundation for efficient computation (parenthesize to minimize operations).
Block Multiplication: If matrices are partitioned into blocks, multiplication follows the same row-column pattern at the block level:
1.7 Factoring into : Column rank = Row rank
Factorization: Every matrix of rank can be factored as:
- is : the independent columns of
- is : the combination coefficients that express every column of in terms of the independent columns in
The First Great Theorem: Column Rank = Row Rank
The factorization makes this obvious: has columns (column rank ), has rows (row rank ), and since , both ranks must equal .
Construction:
- Pick the first independent columns of to form .
- Solve : each column of is expressed as the same linear combination of columns of . Those coefficients go into .
Example: If , the rank is 1. , .
1.8 Rank One Matrices (1 column) (1 row)
A rank one matrix has the form:
Every row is a multiple of , and every column is a multiple of . The matrix has only one independent row and one independent column.
Building block property: Every rank matrix can be written as the sum of rank one matrices:
This is the outer-product view of matrix multiplication.
The Five Great Factorizations of Linear Algebra:
| Factorization | Description |
|---|---|
| Independent columns row coefficients | |
| Lower triangular Upper triangular (elimination) | |
| Orthogonal Upper triangular (Gram-Schmidt) | |
| Symmetric diagonalized by orthogonal eigenvectors | |
| Singular Value Decomposition (any matrix) |
These five factorizations are the backbone of computational linear algebra.