AoZai
AoZai

Reading Notice

These are personal study and translation notes for reference only; the original course materials belong to MIT OpenCourseWare and their respective rights holders.

ZoomNotes for Linear Algebra

Gilbert Strang, MIT 18.06 · Ch.1 / 11

Part 1: Basic Ideas of Linear Algebra

1.1 Linear Combinations of Vectors

A vector in Rn\mathbb{R}^n is an ordered list of nn real numbers, written as a column:

v=[v1v2vn]v = \begin{bmatrix} v_1 \\ v_2 \\ \vdots \\ v_n \end{bmatrix}

A linear combination of vectors v1,v2,,vk\mathbf{v}_1, \mathbf{v}_2, \dots, \mathbf{v}_k is formed by multiplying each vector by a scalar and adding the results:

c1v1+c2v2++ckvkc_1 \mathbf{v}_1 + c_2 \mathbf{v}_2 + \cdots + c_k \mathbf{v}_k

Key insight: Every linear combination of vectors stays within the same space Rn\mathbb{R}^n. The set of all possible linear combinations of a collection of vectors is called their span.

Example in R2\mathbb{R}^2: The vectors v1=[1,0]T\mathbf{v}_1 = [1,0]^T and v2=[0,1]T\mathbf{v}_2 = [0,1]^T span all of R2\mathbb{R}^2 because any vector [x,y]T[x,y]^T can be written as xv1+yv2x\mathbf{v}_1 + y\mathbf{v}_2.


1.2 Dot Products vwv \cdot w and Lengths v\|v\| and Angles θ\theta

The dot product (also called inner product or scalar product) of two vectors in Rn\mathbb{R}^n is:

vw=i=1nviwi=vTw\mathbf{v} \cdot \mathbf{w} = \sum_{i=1}^n v_i w_i = v^T w

Length (norm) of a vector:

v=vv=v12+v22++vn2\|\mathbf{v}\| = \sqrt{\mathbf{v} \cdot \mathbf{v}} = \sqrt{v_1^2 + v_2^2 + \cdots + v_n^2}

This is the Euclidean distance from the origin to the point (v1,,vn)(v_1, \dots, v_n), by Pythagoras in nn dimensions.

Angle between two vectors:

cosθ=vwvw\cos \theta = \frac{\mathbf{v} \cdot \mathbf{w}}{\|\mathbf{v}\| \, \|\mathbf{w}\|}

Schwarz Inequality (Cauchy-Schwarz):

vwvw|\mathbf{v} \cdot \mathbf{w}| \leq \|\mathbf{v}\| \, \|\mathbf{w}\|

Equality holds when v\mathbf{v} and w\mathbf{w} are parallel (one is a scalar multiple of the other).

Perpendicular (Orthogonal) Vectors: vw\mathbf{v} \perp \mathbf{w} iff vw=0\mathbf{v} \cdot \mathbf{w} = 0. For perpendicular vectors, the Pythagorean theorem gives:

v+w2=v2+w2\|\mathbf{v} + \mathbf{w}\|^2 = \|\mathbf{v}\|^2 + \|\mathbf{w}\|^2

Unit vectors have length 11. To normalize any nonzero vector, divide by its length: v^=v/v\hat{\mathbf{v}} = \mathbf{v} / \|\mathbf{v}\|.


1.3 Matrices Multiplying Vectors

A matrix AA of size m×nm \times n multiplies a vector xRnx \in \mathbb{R}^n to produce AxRmAx \in \mathbb{R}^m.

Two ways to view Ax=bAx = b:

Row way (dot product): Each row of AA takes the dot product with xx to produce one component of bb:

bi=j=1nAijxj(row i dot x)b_i = \sum_{j=1}^n A_{ij} x_j \quad \text{(row $i$ dot $x$)}

Column way (linear combination): AxAx is a linear combination of the columns of AA, with coefficients from xx:

Ax=x1col1(A)+x2col2(A)++xncoln(A)Ax = x_1 \text{col}_1(A) + x_2 \text{col}_2(A) + \cdots + x_n \text{col}_n(A)

The Identity Matrix: Ix=xIx = x for all xx. II has 1's on the diagonal and 0's elsewhere.

Example:

[1234][x1x2]=x1[13]+x2[24]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = x_1 \begin{bmatrix} 1 \\ 3 \end{bmatrix} + x_2 \begin{bmatrix} 2 \\ 4 \end{bmatrix}

The column way is fundamental: it tells us that AxAx always lies in the column space of AA.


1.4 Column Space and Row Space of AA

Column Space C(A)C(A): The set of all linear combinations of the columns of AA. Equivalently, C(A)={Ax:xRn}C(A) = \{Ax : x \in \mathbb{R}^n\}.

  • C(A)C(A) is a subspace of Rm\mathbb{R}^m (each column has mm components).
  • The column space contains all possible outputs bb for which Ax=bAx = b has a solution.
  • The rank rr is the dimension of C(A)C(A), i.e., the number of independent columns.

Row Space C(AT)C(A^T): The set of all linear combinations of the rows of AA. Equivalently, the column space of ATA^T.

  • The row space is a subspace of Rn\mathbb{R}^n (each row has nn components).
  • The dimension of the row space also equals rr (the rank).

Key Fact: The column space and row space have the same dimension rr, even though they live in different ambient spaces (Rm\mathbb{R}^m vs Rn\mathbb{R}^n).


1.5 Dependent and Independent Columns

A set of vectors v1,,vn\mathbf{v}_1, \dots, \mathbf{v}_n is linearly dependent if one vector can be written as a combination of the others. Equivalently, there exist scalars c1,,cnc_1, \dots, c_n, not all zero, such that:

c1v1+c2v2++cnvn=0c_1 \mathbf{v}_1 + c_2 \mathbf{v}_2 + \cdots + c_n \mathbf{v}_n = 0

A set is linearly independent if the only solution to the above equation is c1=c2==cn=0c_1 = c_2 = \cdots = c_n = 0.

For columns of a matrix AA:

  • Dependent columns: Ax=0Ax = 0 for some nonzero xx. At least one free variable exists.
  • Independent columns: Ax=0Ax = 0 only when x=0x = 0. 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 rr = number of independent columns = number of independent rows = dimension of C(A)C(A) = dimension of C(AT)C(A^T).


1.6 Matrix-Matrix Multiplication ABAB

There are four equivalent ways to multiply matrices AA (size m×nm \times n) and BB (size n×pn \times p) to get C=ABC = AB (size m×pm \times p):

1. Dot products of rows of AA with columns of BB:

Cij=(row i of A)(column j of B)=k=1nAikBkjC_{ij} = (\text{row } i \text{ of } A) \cdot (\text{column } j \text{ of } B) = \sum_{k=1}^n A_{ik} B_{kj}

2. AA times columns of BB: Each column of CC is AA times the corresponding column of BB:

C=A[b1b2bp]=[Ab1Ab2Abp]C = A \begin{bmatrix} \mathbf{b}_1 & \mathbf{b}_2 & \cdots & \mathbf{b}_p \end{bmatrix} = \begin{bmatrix} A\mathbf{b}_1 & A\mathbf{b}_2 & \cdots & A\mathbf{b}_p \end{bmatrix}

3. Rows of AA times BB: Each row of CC is the corresponding row of AA times BB.

4. Column times row (outer product):

AB=k=1n(column k of A)(row k of B)AB = \sum_{k=1}^n (\text{column } k \text{ of } A)(\text{row } k \text{ of } B)

Each term is an m×pm \times p rank-one matrix.

Associative Law: (AB)C=A(BC)(AB)C = A(BC), 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:

[A11A12A21A22][B11B12B21B22]=[A11B11+A12B21A11B12+A12B22A21B11+A22B21A21B12+A22B22]\begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix} \begin{bmatrix} B_{11} & B_{12} \\ B_{21} & B_{22} \end{bmatrix} = \begin{bmatrix} A_{11}B_{11}+A_{12}B_{21} & A_{11}B_{12}+A_{12}B_{22} \\ A_{21}B_{11}+A_{22}B_{21} & A_{21}B_{12}+A_{22}B_{22} \end{bmatrix}

1.7 Factoring AA into CRCR: Column rank rr = Row rank

CRCR Factorization: Every m×nm \times n matrix AA of rank rr can be factored as:

A=CRA = C R
  • CC is m×rm \times r: the rr independent columns of AA
  • RR is r×nr \times n: the combination coefficients that express every column of AA in terms of the independent columns in CC

The First Great Theorem: Column Rank = Row Rank

The CRCR factorization makes this obvious: CC has rr columns (column rank rr), RR has rr rows (row rank rr), and since A=CRA = CR, both ranks must equal rr.

Construction:

  1. Pick the first rr independent columns of AA to form CC.
  2. Solve A=CRA = CR: each column of AA is expressed as the same linear combination of columns of CC. Those coefficients go into RR.

Example: If A=[123246]A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \end{bmatrix}, the rank is 1. C=[12]C = \begin{bmatrix} 1 \\ 2 \end{bmatrix}, R=[123]R = \begin{bmatrix} 1 & 2 & 3 \end{bmatrix}.


1.8 Rank One Matrices A=A = (1 column) ×\times (1 row)

A rank one matrix has the form:

A=uvT=[u1u2um][v1v2vn]A = \mathbf{u} \mathbf{v}^T = \begin{bmatrix} u_1 \\ u_2 \\ \vdots \\ u_m \end{bmatrix} \begin{bmatrix} v_1 & v_2 & \cdots & v_n \end{bmatrix}

Every row is a multiple of vT\mathbf{v}^T, and every column is a multiple of u\mathbf{u}. The matrix has only one independent row and one independent column.

Building block property: Every rank rr matrix can be written as the sum of rr rank one matrices:

A=i=1ruiviTA = \sum_{i=1}^r \mathbf{u}_i \mathbf{v}_i^T

This is the outer-product view of matrix multiplication.

The Five Great Factorizations of Linear Algebra:

Factorization Description
A=CRA = CR Independent columns ×\times row coefficients
A=LUA = LU Lower triangular ×\times Upper triangular (elimination)
A=QRA = QR Orthogonal ×\times Upper triangular (Gram-Schmidt)
S=QΛQTS = Q\Lambda Q^T Symmetric SS diagonalized by orthogonal eigenvectors
A=UΣVTA = U\Sigma V^T Singular Value Decomposition (any matrix)

These five factorizations are the backbone of computational linear algebra.

Next
© MIT OpenCourseWare  |  18.06 Linear Algebra  |  Gilbert Strang  |  Spring 2010
ocw.mit.edu  ·  CC BY-NC-SA 4.0