Concept Flow - Matrix rank and null space
Start with matrix A
Calculate rank(A)
Calculate null space of A
Interpret results
End
We start with a matrix A, find its rank, then find its null space, and finally interpret what these results mean.
A = [1 2 3; 4 5 6; 7 8 9]; r = rank(A); N = null(A);
| Step | Action | Value/Result | Explanation |
|---|---|---|---|
| 1 | Define matrix A | [[1 2 3]; [4 5 6]; [7 8 9]] | Matrix A is set with 3 rows and 3 columns |
| 2 | Calculate rank(A) | 2 | Rank is 2 because rows are linearly dependent |
| 3 | Calculate null(A) | [[-1; 2; -1]] | Null space is a vector that satisfies A*x=0 |
| 4 | Interpret rank | 2 | Rank 2 means 2 independent rows/columns |
| 5 | Interpret null space | 1-dimensional | Null space dimension = number of columns - rank = 1 |
| 6 | End | - | Finished calculations |
| Variable | Start | After Step 1 | After Step 2 | After Step 3 | Final |
|---|---|---|---|---|---|
| A | undefined | [[1 2 3]; [4 5 6]; [7 8 9]] | [[1 2 3]; [4 5 6]; [7 8 9]] | [[1 2 3]; [4 5 6]; [7 8 9]] | [[1 2 3]; [4 5 6]; [7 8 9]] |
| r | undefined | undefined | 2 | 2 | 2 |
| N | undefined | undefined | undefined | [[-1]; [2]; [-1]] | [[-1]; [2]; [-1]] |
Matrix rank: number of independent rows/columns. Null space: vectors x where A*x=0. rank(A) + nullity(A) = number of columns. Use rank(A) and null(A) in MATLAB. Rank shows dimension of image space. Null space shows dependencies.