Lab 3.1

Finding the Null Space

Focus
eliminate → split columns → build a basis
Notebook
Ch3-1 Null Space.ipynb

Lab goal

Identify pivot and free variables, then construct and verify one null-space basis vector.

Lecture-note concepts
  • Null space
  • Pivot and free variables
  • Rank and nullity
  • Linear independence

Code extensionThe full notebook detects pivots in a random 10×11 matrix and constructs several null-space basis vectors at once.

Key ideas

Terms you will use

Null spaceNull(A) = {x : Ax = 0}

The null space contains every input vector that A sends to the zero output.

Free variablepivot part = −Uₚ⁻¹U𝒻 · free part

A non-pivot variable can be chosen first; the pivot variables then adjust to satisfy the equations.

Rank–nullityrank(A) + nullity(A) = n

The input coordinates split between pivot directions and null directions.

Lab 3.1 · Guided example

Build a direction that disappears

The notebook’s random 10×11 example is reduced to one 2×3 matrix so every pivot, free variable, and cancellation stays visible.

Select a line to see its action, array shape, and concrete operation.

Simplified fromCh3-1 Null Space.ipynbThe full source uses LU and automatic pivot detection; this example exposes the same core construction by hand.

Line 1: import numpy as np
L01 / 14Create a small wide matrix
Predict

Which of the three columns will become free?

Before

Three input coordinates, two output coordinates

Because A maps R³ into R², we look for an input direction that collapses to zero.

A: R³ → R² · rank(A) + nullity(A) = 3
After
?

Reveal to compare.

A.shapenot stored Three-dimensional inputs, two-dimensional outputs.

Continue in Python

Run the complete notebook in Colab

Run the original code and change the inputs.