BetaFree coursewareRewritten from MIT OpenCourseWareCC BY-NC-SA 4.0
Open CosmologyPhysics & cosmology, from high school to a graduate year

Independence, basis and dimension

When Ax = 0 has more unknowns than equations (n > m), there are free variables and so nonzero solutions. Vectors are independent when no combination of them gives zero except the zero combination; v and 2v are dependent, so is any set containing the zero vector, and so are any three vectors in the plane. Put them in the columns of A: they are independent exactly when N(A) contains only zero, that is, when the rank is n with no free variables. Vectors span a space when the space consists of all their combinations, as the columns span the column space. A basis is a set of vectors that is independent and spans. The columns of the identity are one basis of R³, and n vectors form a basis of Rⁿ exactly when the n × n matrix with those columns is invertible. Bases are not unique, but every basis of a given space has the same number of vectors: the dimension. For A with columns (1, 1, 1), (2, 1, 2), (3, 2, 3), (1, 1, 1), the pivot columns 1 and 2 are a basis of C(A), so the rank 2 is the dimension of the column space, and the two special solutions are a basis of N(A), whose dimension is n − r = 2.

You need this first

Full reading path (13 pages)
  1. Vectors (8.01)
  2. Vectors and the dot product (18.02)
  3. Determinants and the cross product (18.02)
  4. Planes through three points, and matrices (18.02)
  5. Equations of planes and square systems (18.02)
  6. The geometry of linear equations (18.06)
  7. Elimination with matrices (18.06)
  8. Matrix multiplication and inverse matrices (18.06)
  9. Factorization into A = LU (18.06)
  10. Transposes, permutations and vector spaces (18.06)
  11. Column space and nullspace (18.06)
  12. Solving Ax = 0: pivot variables and special solutions (18.06)
  13. Solving Ax = b: the complete solution (18.06)
On this page · 6 sections
  1. More unknowns than equations
  2. Independence
  3. Span and basis
  4. Dimension
  5. Example: column space and nullspace
  6. Summary

This key lecture gives four words clear meanings: independence, span, basis and dimension (transcript, p. 1). Note what they apply to: a set of vectors is independent, spans, or is a basis; a space has a dimension. It continues the complete solution of Ax = b.

More unknowns than equations#

First a fact (transcript, pp. 1–2). If AA is m×nm \times n with n>mn > m, more unknowns than equations, then Ax=0Ax = 0 has nonzero solutions. The reason is the algorithm: elimination finds at most mm pivots, so at least n−mn - m variables are free, and giving a free variable the value 1 produces a solution that is not all zeros (p. 2).

Independence#

Independence
c1x1+c2x2+⋯+cnxn≠0unless c1=c2=⋯=cn=0c_1x_1 + c_2x_2 + \cdots + c_nx_n \ne 0 \quad \text{unless } c_1 = c_2 = \cdots = c_n = 0
In words

c one x one plus c two x two plus and so on plus c sub n x sub n is not equal to 0 unless c one equals c two equals and so on equals c sub n equals 0

Vectors x1,…,xnx_1, \dots, x_n are independent if no combination gives the zero vector except the zero combination; if some other combination gives zero, they are dependent (p. 3). Examples in the plane (pp. 4–6):

  • vv and 2v2v are dependent: 2v1−v2=02v_1 - v_2 = 0 (p. 4);
  • a vector and the zero vector are dependent: take none of the first and, say, six of the zero vector. If one vector is zero, independence is dead (pp. 4–5);
  • two vectors in different directions are independent, but three vectors in the plane are always dependent (pp. 5–6).

The last follows from the fact above. Put the vectors in the columns of a 2×32 \times 3 matrix; there is a free variable, so some c=(c1,c2,c3)≠0c = (c_1, c_2, c_3) \ne 0 has Ac=0Ac = 0, a combination of the columns giving zero (p. 6).

Columns of a matrix (pp. 7–8). For vectors v1,…,vnv_1, \dots, v_n in the columns of AA, a combination is AcAc, so:

Independence and the nullspace
independent   exactly when   N(A)={0}   exactly when   r=n (no free variables);dependent   exactly when   Ac=0 for some c≠0   exactly when   r<n\text{independent} \;\text{ exactly when }\; N(A) = \{0\} \;\text{ exactly when }\; r = n \text{ (no free variables)}; \qquad \text{dependent} \;\text{ exactly when }\; Ac = 0 \text{ for some } c \ne 0 \;\text{ exactly when }\; r < n
In words

independent exactly when capital N ( capital A ) equals 0 exactly when r equals n (no free variables); dependent exactly when capital A c equals 0 for some c is not equal to 0 exactly when r less than n

A free column is a combination of earlier columns, so with independent columns all nn are pivot columns (p. 7). The definition itself needs no matrix, and later the vectors need not be columns at all (p. 8).

Span and basis#

A set of vectors spans a space when the space consists of all their combinations; the columns of a matrix span its column space (pp. 8–9). The space they span is the smallest space containing them (p. 9). Spanning vectors may or may not be independent (p. 9).

A basis for a vector space is a sequence of vectors with two properties: they are independent, and they span the space. Enough vectors, and not too many (p. 10). A basis tells everything about a subspace (p. 10).

Bases of R3\mathrm{R}^3 (pp. 11–14). The columns of the identity, along the xx, yy and zz axes, are one basis: c1(1,0,0)+c2(0,1,0)+c3(0,0,1)=0c_1(1, 0, 0) + c_2(0, 1, 0) + c_3(0, 0, 1) = 0 forces all cc's to be 0, as N(I)={0}N(I) = \{0\} (pp. 11–12). The pair (1,1,2)(1, 1, 2) and (2,2,5)(2, 2, 5) is independent but does not span R3\mathrm{R}^3 (p. 12). Adding their sum (3,3,7)(3, 3, 7) would be a goof: it lies in their plane (p. 13). For nn vectors in Rn\mathrm{R}^n the test is (pp. 13–14):

Basis of Rⁿ
v1,…,vn are a basis of Rn   exactly when   the n×n matrix with these columns is invertiblev_1, \dots, v_n \text{ are a basis of } \mathrm{R}^n \;\text{ exactly when }\; \text{the } n \times n \text{ matrix with these columns is invertible}
In words

v one, and so on, v n are a basis of R to the power n exactly when the n times n matrix with these columns is invertible

(Strang tries (3,3,8)(3, 3, 8) as the third vector and says he believes it gives a basis, p. 13. It does not: all three vectors have equal first and second components, so they lie in the plane x=yx = y; indeed (3,3,8)=2(2,2,5)−(1,1,2)(3, 3, 8) = 2(2, 2, 5) - (1, 1, 2), and the matrix with these columns has two equal rows and is singular. The other vector he mentions, (5,7,−14)(5, 7, -14), would work as the third vector: that matrix has determinant −2-2. Strang corrects the error at the start of Lecture 10.)

The pair (1,1,2)(1, 1, 2), (2,2,5)(2, 2, 5) is still a basis of something: the plane it spans (p. 14). Adding (3,3,7)(3, 3, 7) would still span the plane, but the three would no longer be independent (p. 14).

Dimension#

Bases are far from unique: the columns of any invertible 3×33 \times 3 matrix are a basis of R3\mathrm{R}^3 (transcript, p. 15). But every basis of a given space has the same number of vectors, three for R3\mathrm{R}^3, nn for Rn\mathrm{R}^n, and likewise for a column space, a nullspace, or any other space (pp. 15–16). That number is the dimension of the space (p. 16):

Dimension
dim(space)=number of vectors in any basis\text{dim}(\text{space}) = \text{number of vectors in any basis}
In words

dim ( space ) equals number of vectors in any basis

If a space has dimension 6, seven vectors are too many and five not enough (p. 16).

Example: column space and nullspace#

Take the matrix whose third column is the sum of the first two and whose fourth repeats the first (transcript, p. 17):

The example
A=(123111211231)A = \begin{pmatrix} 1 & 2 & 3 & 1 \\ 1 & 1 & 2 & 1 \\ 1 & 2 & 3 & 1 \end{pmatrix}
In words

capital A equals 1 2 3 1; 1 1 2 1; 1 2 3 1

The four columns span C(A)C(A) by definition, but they are not independent: (−1,−1,1,0)(-1, -1, 1, 0) is in the nullspace (pp. 17–18). The natural basis of C(A)C(A) is the pivot columns, 1 and 2; columns 3 and 4 add nothing (pp. 18–19). So (p. 19):

Rank and the column space
rank⁡(A)=r=number of pivot columns=dim C(A)=2\operatorname{rank}(A) = r = \text{number of pivot columns} = \text{dim}\, C(A) = 2
In words

r a n k ( capital A ) equals r equals number of pivot columns equals dim capital C ( capital A ) equals 2

A matrix has a rank; a space has a dimension; and the rank of a matrix is the dimension of its column space (pp. 19–20). Other bases: columns 1 and 3, 2 and 3, or 2 and 4, or vectors not among the columns at all, such as (2,2,2)(2, 2, 2) and (7,5,7)(7, 5, 7), the sum of all four columns (pp. 20–21). When the dimension is known, the right number of independent vectors is automatically a basis: if they failed to span, a further vector could be added independently, too many for the dimension (p. 21).

For the nullspace, (−1,−1,1,0)(-1, -1, 1, 0) alone does not span it (p. 22). Setting the free variables to (1,0)(1, 0) and (0,1)(0, 1) gives the two special solutions, which say how the columns depend on each other: column 3 is column 1 plus column 2, and column 4 equals column 1 (pp. 22–23). They are a basis of N(A)N(A) (pp. 23–24):

Dimension of the nullspace
N(A) has basis (−1−110),(−1001);dim N(A)=number of free variables=n−rN(A) \text{ has basis } \begin{pmatrix} -1 \\ -1 \\ 1 \\ 0 \end{pmatrix}, \begin{pmatrix} -1 \\ 0 \\ 0 \\ 1 \end{pmatrix}; \qquad \text{dim}\, N(A) = \text{number of free variables} = n - r
In words

capital N ( capital A ) has basis minus 1; minus 1; 1; 0, minus 1; 0; 0; 1; dim capital N ( capital A ) equals number of free variables equals n minus r

Worked example

Testing independence and finding a basis

(a) Find a basis and the dimension of the space spanned by v1=(1,0,1,2)v_1 = (1, 0, 1, 2), v2=(0,1,1,1)v_2 = (0, 1, 1, 1), v3=(−1,2,1,0)v_3 = (-1, 2, 1, 0), v4=(2,1,3,5)v_4 = (2, 1, 3, 5), and a basis of the nullspace of the matrix with these columns. Is (1,2,3,4)(1, 2, 3, 4) in the span? (b) Are (1,1,0)(1, 1, 0), (0,1,1)(0, 1, 1), (1,0,1)(1, 0, 1) a basis of R3\mathrm{R}^3?

(a) Dependences

v3=2v2−v1v_3 = 2v_2 - v_1 and v4=2v1+v2v_4 = 2v_1 + v_2, while v1v_1 and v2v_2 are not multiples of each other. So v1,v2v_1, v_2 are a basis of the span, which has dimension 2: a plane in R4\mathrm{R}^4. The matrix is 4×44 \times 4 of rank 2, so its nullspace has dimension 4−2=24 - 2 = 2, with basis (1,−2,1,0)(1, -2, 1, 0) and (−2,−1,0,1)(-2, -1, 0, 1).

(a) A vector in the span?

av1+bv2=(a,b,a+b,2a+b)av_1 + bv_2 = (a, b, a + b, 2a + b). Matching (1,2,3,4)(1, 2, 3, 4) needs a=1a = 1, b=2b = 2, and then a+b=3a + b = 3 and 2a+b=42a + b = 4 both agree. So yes: (1,2,3,4)=v1+2v2(1, 2, 3, 4) = v_1 + 2v_2.

(b) Three vectors in R³

The matrix with these columns has determinant 1⋅(1−0)−0+1⋅(1−0)=2≠01 \cdot (1 - 0) - 0 + 1 \cdot (1 - 0) = 2 \ne 0, so it is invertible and the three vectors are a basis.

Summary#

  • More unknowns than equations: Ax=0Ax = 0 has nonzero solutions.
  • Independent: only the zero combination gives zero; for columns, N(A)={0}N(A) = \{0\} and r=nr = n.
  • Span: all combinations. Basis: independent and spanning. nn vectors are a basis of Rn\mathrm{R}^n exactly when the matrix of them is invertible.
  • Every basis has the same number of vectors, the dimension. dim C(A)=r\text{dim}\, C(A) = r; dim N(A)=n−r\text{dim}\, N(A) = n - r.

Symbols on this page

Show the 30 symbols used here
≠\neq not equal.
Is not equal to. Say it: “is not equal to”.
×\times times.
Times (multiplication). Between two vectors: the cross product. Say it: “times”.
⋅\cdot dot.
Times (multiplication). Between two vectors: the dot product. Say it: “times”.
aa a.
The coefficient of v₁ in the worked example. Say it: “a”.
zz z.
The third coordinate axis. Say it: “z”.
cc c.
The vector of coefficients (c₁, …, cₙ): a combination of the columns of A is Ac. Say it: “c”.
xx x.
The first coordinate; the plane x = y. Say it: “x”.
yy y.
The second coordinate; the plane x = y. Say it: “y”.
nn n.
The number of vectors (columns); Rⁿ is the space of vectors with n components. Say it: “n”.
mm m.
The number of rows (equations). Say it: “m”.
vv v.
A vector in the plane (v and 2v are dependent). Say it: “v”.
rr r.
The rank: the number of pivots. Say it: “r”.
AA A.
The matrix whose columns are the vectors being tested; in the example, the 3 × 4 matrix with columns (1, 1, 1), (2, 1, 2), (3, 2, 3), (1, 1, 1). Say it: “capital A”.
CC C.
As in C(A): the column space of A. Say it: “capital C”.
bb b.
The coefficient of v₂ in the worked example. Say it: “b”.
NN N.
As in N(A): the nullspace of A. Say it: “capital N”.
x1x_{1} x 1.
The first of the vectors tested for independence. Say it: “x one”.
x2x_{2} x 2.
The second of the vectors tested for independence. Say it: “x two”.
xnx_{n} x n.
The last of the vectors tested for independence. Say it: “x sub n”.
v1v_{1} v one.
The first vector of a set (a column of A, or a basis vector). Say it: “v one”.
v2v_{2} v two.
The second vector of a set. Say it: “v two”.
II I.
The identity matrix. Say it: “capital I”.
v3v_{3} v 3.
The third vector of a set. Say it: “v three”.
c1c_{1} c one.
The coefficient of the first vector in a combination. Say it: “c one”.
c2c_{2} c two.
The coefficient of the second vector in a combination. Say it: “c two”.
cic_{i} c i.
Any one of the coefficients of a combination. Say it: “c sub i”.
c3c_{3} c 3.
The coefficient of the third vector in a combination. Say it: “c three”.
cnc_{n} c sub n.
The coefficient of the last vector in a combination. Say it: “c sub n”.
v4v_{4} v four.
The fourth vector of the worked example. Say it: “v four”.
vnv_{n} v n.
The last vector of a set. Say it: “v n”.

Tap or click a symbol in a formula to see the same explanation. All symbols: symbols and notation.

Words on this page

Show the 25 words used here

New here

independence.
Of vectors: none of them is a combination of the others, so the only combination giving zero uses all zero coefficients.
span.
The span of some vectors is everything that can be made by combining them; vectors span a space when they fill all of it.
basis.
A set of independent vectors from which every vector in a space can be built, in exactly one way, as a combination.
dimension.
The number of vectors in any basis of a vector space or subspace.

Also used

p..
Page, in a reference to a source; pp. means pages, as in pp. 3–5.
vector.
A list of numbers written as a column, or more generally anything that can be added and multiplied by numbers. Explained in Orthogonal vectors and subspaces.
elimination.
Solving equations by subtracting multiples of one from another until each unknown can be found in turn. Explained in The geometry of linear equations.
pivot.
In elimination, the first nonzero number in a row, used to clear out the entries below it. Explained in Positive definite matrices and minima.
free variable.
An unknown whose column has no pivot, so it can be given any value; the other unknowns are then fixed by the equations.
zero vector.
The vector whose components are all zero; adding it to any vector changes nothing. Explained in Transposes, permutations and vector spaces.
matrix.
A rectangular table of numbers, which acts on vectors to give new ones and so describes a linear change of coordinates. Explained in Planes through three points, and matrices.
free column.
A column of a matrix with no pivot after elimination; it is a combination of the pivot columns before it. Explained in Solving Ax = 0: pivot variables and special solutions.
pivot column.
A column of a matrix that contains a pivot after elimination; the matching columns of the original matrix form a basis for its column space. Explained in Column space and nullspace.
column space.
All the vectors made by combining the columns of a matrix; Ax = b can be solved exactly when b lies in it. Explained in Matrix multiplication and inverse matrices.
vector space.
A collection of objects, called vectors, that can be added together and multiplied by numbers, with the results staying in the collection. Explained in Transposes, permutations and vector spaces.
subspace.
A set of vectors inside a larger space that is a space itself: sums and multiples of its vectors stay inside it. Explained in Transposes, permutations and vector spaces.
singular.
Of a square matrix: having no inverse, because its determinant is zero and some nonzero vector is sent to zero. Explained in The geometry of linear equations.
determinant.
A single number worked out from a square array of numbers (a matrix), which measures how the matrix stretches areas or volumes. Explained in Determinants and the cross product.
invertible.
Of a square matrix or operator: having an inverse that undoes it; for a matrix this happens exactly when its determinant is not zero. Explained in The geometry of linear equations.
nullspace.
All the vectors x that a matrix sends to zero, that is, all solutions of Ax = 0. Explained in Column space and nullspace.
rank.
The number of independent columns of a matrix, which always equals the number of independent rows. Explained in Similar matrices and the Jordan form.
special solution.
A solution of Ax = 0 found by setting one free variable to 1 and the others to 0; together they build every solution. Explained in Solving Ax = 0: pivot variables and special solutions.

Academic

transcript.
A written record of exactly what was said in a recorded lecture, word for word.
likewise.
In the same way; similarly.
by definition.
True simply because of what the words or symbols were set up to mean, not because of any further fact.

Tap or click a word, here or in the text, for its meaning in this lesson. All words: the glossary. How many words are marked in the text: Reading options (the “Aa” button).

Where this leads

In cosmology

32 more cosmology pages that build on this

Pages that build on this

Practise

Check your understanding

  1. Five vectors in R4\mathrm{R}^4 are…
  2. The columns of a 3×33 \times 3 matrix form a basis of R3\mathrm{R}^3 exactly when the matrix is…
  3. A 5×75 \times 7 matrix has rank 3. What is the dimension of its nullspace?
0 of 3 answered

Flashcards

1 / 3