Back

Linear Algebra: Vector Spaces, Row Spaces, and Column Spaces


Definition

1. Vector Space

A vector space is a collection of objects (called vectors) that can be added together and multiplied by numbers (called scalars, usually real numbers R\mathbb{R}) without leaving the set.

Think of a vector space as a “safe zone” with strict boundaries. As long as you follow the allowed operations (adding vectors or scaling them), your resulting vector will always stay inside that space.

2. Subspace

A subspace is simply a smaller vector space sitting inside a larger vector space. To be a valid subspace, it must inherit and obey all the rules of the larger space.

3. Linear Combination

A linear combination is the result of taking a set of vectors, scaling each one by some number, and adding them together:

w=c1v1+c2v2++ckvkw = c_1 v_1 + c_2 v_2 + \dots + c_k v_k

Here, c1,c2,,ckc_1, c_2, \dots, c_k are real numbers called coefficients.

4. Span

The span of a set of vectors {v1,v2,,vk}\{v_1, v_2, \dots, v_k\} is the set of ALL possible linear combinations you can create using those vectors.

  • If you have one vector, its span is a line stretching to infinity in both directions.
  • If you have two non-parallel vectors in 3D space, their span forms a flat 2D plane through the origin.

5. Linear Independence and Basis

  • Linear Independence: A set of vectors is linearly independent if no vector in the set can be built out of a combination of the others. None of them are “redundant.”
  • Basis: A basis for a space is a minimal set of linearly independent vectors that spans the entire space.
  • Dimension: The number of vectors in a basis for that space.

6. The Fundamental Spaces of a Matrix

For any m×nm \times n matrix AA (a table with mm rows and nn columns):

  • Column Space (Col(A)\text{Col}(A)): The span of all column vectors of AA. It lives in Rm\mathbb{R}^m.
  • Row Space (Row(A)\text{Row}(A)): The span of all row vectors of AA. It lives in Rn\mathbb{R}^n.
  • Null Space (Null(A)\text{Null}(A)): The set of all input vectors xx that get squished to zero when multiplied by AA (Ax=0Ax = 0). It lives in Rn\mathbb{R}^n.

Key Points

The 8 Axioms of a Vector Space

To qualify as a vector space, a set VV with vector addition (++) and scalar multiplication (\cdot) must satisfy these 8 rules for all vectors u,v,wVu, v, w \in V and all real scalars c,dRc, d \in \mathbb{R}:

CategoryPropertyFormula / RuleMeaning in Plain English
Vector Addition1. Commutativityu+v=v+uu + v = v + uOrder does not matter when adding.
2. Associativity(u+v)+w=u+(v+w)(u + v) + w = u + (v + w)Grouping does not matter when adding three vectors.
3. Zero Vector (Identity)u+0=uu + 0 = uThere exists a unique zero vector 00 that leaves vectors unchanged.
4. Inverse Vectoru+(u)=0u + (-u) = 0Every vector has an exact opposite that cancels it out to zero.
Scalar Multiplication5. Distributivity over Scalars(c+d)u=cu+du(c + d)u = cu + duScaling a vector by (c+d)(c+d) is the same as scaling by cc and dd separately and adding.
6. Distributivity over Vectorsc(u+v)=cu+cvc(u + v) = cu + cvScaling a sum of vectors scales each vector individually.
7. Scalar Compatibilityc(du)=(cd)uc(du) = (cd)uScaling successively by dd then cc is the same as scaling by cdcd at once.
8. Identity Scalar1u=u1 \cdot u = uMultiplying any vector by 11 leaves it completely unchanged.

The 3-Step Subspace Test

If you want to check if a subset WW is a valid subspace of VV, you do not need to test all 8 axioms. You only need to verify these 3 conditions:

  1. Contains Zero: Is the zero vector 00 in WW? (If not, it fails immediately.)
  2. Closed under Addition: If uWu \in W and vWv \in W, is u+vWu + v \in W?
  3. Closed under Scalar Multiplication: If uWu \in W and cRc \in \mathbb{R}, is cuWcu \in W?

Visualizing Subspaces in Standard Geometry

  • In 1D Space (R1\mathbb{R}^1):

  • The origin {0}\{0\} (0-dimensional)

  • The entire line R1\mathbb{R}^1 (1-dimensional)

  • In 2D Space (R2\mathbb{R}^2):

  • The origin {(0,0)}\{(0,0)\} (0-dimensional)

  • Any straight line passing through (0,0)(0,0) (1-dimensional)

  • The entire plane R2\mathbb{R}^2 (2-dimensional)

  • In 3D Space (R3\mathbb{R}^3):

  • The origin {(0,0,0)}\{(0,0,0)\} (0-dimensional)

  • Any line passing through (0,0,0)(0,0,0) (1-dimensional)

  • Any flat plane passing through (0,0,0)(0,0,0) (2-dimensional)

  • The entire space R3\mathbb{R}^3 (3-dimensional)

Important Note: A line or plane that does not pass through the origin is NOT a subspace, because it fails Step 1 (does not contain 00).


Matrix Space Rules & Relationships

1. Column Space (Col(A)\text{Col}(A)) and Linear Systems

The system of equations Ax=bAx = b can be written in vector form as:

x1[col1]+x2[col2]++xn[coln]=bx_1 \begin{bmatrix} \text{col}_1 \end{bmatrix} + x_2 \begin{bmatrix} \text{col}_2 \end{bmatrix} + \dots + x_n \begin{bmatrix} \text{col}_n \end{bmatrix} = b

  • This means Ax=bAx = b has a solution if and only if bb is a linear combination of the columns of AA.
  • In other words: Ax=bAx = b is solvable if and only if bCol(A)b \in \text{Col}(A).

2. The Rank-Nullity Theorem

For any m×nm \times n matrix AA:

Rank(A)+Nullity(A)=n(Total Number of Columns)\text{Rank}(A) + \text{Nullity}(A) = n \quad (\text{Total Number of Columns})

  • Rank(A)\text{Rank}(A) = dim(Col(A))=dim(Row(A))\dim(\text{Col}(A)) = \dim(\text{Row}(A)) = Number of pivot columns.
  • Nullity(A)\text{Nullity}(A) = dim(Null(A))\dim(\text{Null}(A)) = Number of free variables.

Detailed Step-by-Step Example

Let’s take a full problem from start to finish.

Problem: Given the 3×33 \times 3 matrix AA:

A=[123245122]A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 5 \\ 1 & 2 & 2 \end{bmatrix}

Find:

  1. The Reduced Row Echelon Form (RREF\text{RREF}) of AA.
  2. A basis and dimension for Col(A)\text{Col}(A).
  3. A basis and dimension for Row(A)\text{Row}(A).
  4. A basis and dimension for Null(A)\text{Null}(A).

Step 1: Perform Row Operations to Get RREF

To analyze any matrix space, we first simplify the matrix into Row Echelon Form (REF) or Reduced Row Echelon Form (RREF) using Gaussian Elimination.

[123245122]\begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 5 \\ 1 & 2 & 2 \end{bmatrix}

  1. Eliminate entries below the first pivot (11 in row 1):
  • Row 2 \leftarrow Row 2 2×- 2 \times Row 1:

[245][246]=[001]\begin{bmatrix} 2 & 4 & 5 \end{bmatrix} - \begin{bmatrix} 2 & 4 & 6 \end{bmatrix} = \begin{bmatrix} 0 & 0 & -1 \end{bmatrix}

  • Row 3 \leftarrow Row 3 1×- 1 \times Row 1:

[122][123]=[001]\begin{bmatrix} 1 & 2 & 2 \end{bmatrix} - \begin{bmatrix} 1 & 2 & 3 \end{bmatrix} = \begin{bmatrix} 0 & 0 & -1 \end{bmatrix}

Now our matrix looks like:

[123001001]\begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & -1 \\ 0 & 0 & -1 \end{bmatrix}

  1. Eliminate entry in Row 3 using Row 2:
  • Row 3 \leftarrow Row 3 - Row 2:

[123001000]\begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & -1 \\ 0 & 0 & 0 \end{bmatrix}

  1. Normalize Row 2 (multiply by 1-1):

[123001000]\begin{bmatrix} 1 & 2 & 3 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}

  1. Clear entry above the second pivot (33 in Row 1, Column 3):
  • Row 1 \leftarrow Row 1 3×- 3 \times Row 2:

RREF(A)=[120001000]\text{RREF}(A) = \begin{bmatrix} \mathbf{1} & 2 & 0 \\ 0 & 0 & \mathbf{1} \\ 0 & 0 & 0 \end{bmatrix}


Step 2: Find the Column Space Basis and Dimension

  1. Look at RREF(A)\text{RREF}(A) and find the pivot columns (columns starting with a leading 11):
  • Column 1 has a pivot in row 1.
  • Column 3 has a pivot in row 2.
  • Column 2 has no pivot (it corresponds to a free variable).
  1. CRITICAL STEP: Go back to the ORIGINAL matrix AA to select the basis vectors corresponding to these pivot positions:

Column 1 of A=[121],Column 3 of A=[352]\text{Column 1 of } A = \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}, \quad \text{Column 3 of } A = \begin{bmatrix} 3 \\ 5 \\ 2 \end{bmatrix}

  1. Write down the answer:

Basis for Col(A)={[121],[352]}\text{Basis for } \text{Col}(A) = \left\{ \begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}, \begin{bmatrix} 3 \\ 5 \\ 2 \end{bmatrix} \right\}

  • Dimension (Rank\text{Rank}): 22 (since there are 2 vectors in the basis).

Step 3: Find the Row Space Basis and Dimension

  1. For the row space, take the non-zero rows directly from RREF(A)\text{RREF}(A) (or any valid REF matrix):
  • Row 1: [120]\begin{bmatrix} 1 & 2 & 0 \end{bmatrix}
  • Row 2: [001]\begin{bmatrix} 0 & 0 & 1 \end{bmatrix}
  1. Write down the answer:

Basis for Row(A)={[120],[001]}\text{Basis for } \text{Row}(A) = \left\{ \begin{bmatrix} 1 & 2 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 & 1 \end{bmatrix} \right\}

  • Dimension: 22 (notice that dim(Row(A))=dim(Col(A))=Rank(A)\dim(\text{Row}(A)) = \dim(\text{Col}(A)) = \text{Rank}(A)).

Step 4: Find the Null Space Basis and Dimension

The null space consists of all vectors x=[x1x2x3]x = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} that satisfy RREF(A)x=0\text{RREF}(A) \cdot x = 0:

[120001000][x1x2x3]=[000]\begin{bmatrix} 1 & 2 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}

Convert this back into linear equations:

  1. 1x1+2x2+0x3=0    x1=2x21x_1 + 2x_2 + 0x_3 = 0 \implies x_1 = -2x_2
  2. 0x1+0x2+1x3=0    x3=00x_1 + 0x_2 + 1x_3 = 0 \implies x_3 = 0
  3. x2x_2 has no pivot equation, so x2x_2 is a free variable. Let x2=tx_2 = t (where tRt \in \mathbb{R}).

Express xx in parametric form:

x=[x1x2x3]=[2tt0]=t[210]x = \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} -2t \\ t \\ 0 \end{bmatrix} = t \begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}

Write down the answer:

Basis for Null(A)={[210]}\text{Basis for } \text{Null}(A) = \left\{ \begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix} \right\}

  • Dimension (Nullity\text{Nullity}): 11 (1 free variable).

Explanation

Why Do We Take Column Space Vectors from the Original Matrix, but Row Space Vectors from RREF?

  • For Column Space: Row operations add and subtract rows from each other. Doing this changes the direction of column vectors in space, but it preserves the dependency relationships among columns. Therefore, RREF tells us which columns are independent, but we must return to matrix AA to get the actual vectors that span Col(A)\text{Col}(A).
  • For Row Space: Performing row operations simply creates new rows that are linear combinations of the existing rows. The span of the rows never changes during row reduction. The non-zero rows in RREF are clean, simplified versions of the original rows that span the exact same space.

Verification using Rank-Nullity Theorem

Rank(A)+Nullity(A)=Number of Columns (n)\text{Rank}(A) + \text{Nullity}(A) = \text{Number of Columns } (n)

2dim(Col(A))+1dim(Null(A))=3\underbrace{2}_{\dim(\text{Col}(A))} + \underbrace{1}_{\dim(\text{Null}(A))} = 3 \quad \checkmark


Output Summary

Here is a full breakdown of what each space represents in our example:

SubspaceBasis VectorsDimensionLives in SpaceGeometry
Col(A)\text{Col}(A)[121],[352]\begin{bmatrix} 1 \\ 2 \\ 1 \end{bmatrix}, \begin{bmatrix} 3 \\ 5 \\ 2 \end{bmatrix}2R3\mathbb{R}^3A 2D plane passing through (0,0,0)(0,0,0)
Row(A)\text{Row}(A)[120],[001]\begin{bmatrix} 1 & 2 & 0 \end{bmatrix}, \begin{bmatrix} 0 & 0 & 1 \end{bmatrix}2R3\mathbb{R}^3A 2D plane passing through (0,0,0)(0,0,0)
Null(A)\text{Null}(A)[210]\begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}1R3\mathbb{R}^3A 1D line passing through (0,0,0)(0,0,0)

Common Mistakes

1. Copying Column Space vectors directly from RREF

  • WRONG: Basis for Col(A)={[100],[010]}\text{Basis for } \text{Col}(A) = \left\{ \begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 0 \end{bmatrix} \right\}
  • RIGHT: Use the pivot column positions from RREF, but copy the vectors from the original matrix AA.

2. Assuming a set is a subspace without checking the zero vector

  • Example Question: Is the set W={(x,y)R2y=2x+1}W = \{(x, y) \in \mathbb{R}^2 \mid y = 2x + 1\} a subspace?
  • Mistake: Starting complex algebra.
  • Quick Check: Plug in (0,0)    0=2(0)+1    0=1(0, 0) \implies 0 = 2(0) + 1 \implies 0 = 1 (False!). It does not contain the origin, so it cannot be a subspace.

3. Mixing up matrix dimensions

For an m×nm \times n matrix AA:

  • Columns have mm entries, so Col(A)Rm\text{Col}(A) \subseteq \mathbb{R}^m.
  • Rows have nn entries, so Row(A)Rn\text{Row}(A) \subseteq \mathbb{R}^n.
  • Solution vectors xx have nn entries, so Null(A)Rn\text{Null}(A) \subseteq \mathbb{R}^n.

Short Exam Notes

  • Subspace Test Checklist:
  1. Contains zero vector (0W0 \in W)?
  2. Closed under addition (u+vWu + v \in W)?
  3. Closed under scalar multiplication (cuWcu \in W)?
  • Linear Solvability: Ax=bAx = b is solvable     bCol(A)\iff b \in \text{Col}(A).
  • Pivot Columns: Identify linear independence and give the basis for Col(A)\text{Col}(A) (from original AA).
  • Non-zero Rows of RREF: Directly form a basis for Row(A)\text{Row}(A).
  • Free Variables: Indicate the presence of a non-trivial Null Space (Nullity=number of free variables\text{Nullity} = \text{number of free variables}).
  • Golden Formula: Rank(A)+Nullity(A)=n\text{Rank}(A) + \text{Nullity}(A) = n (number of columns).