Unit 4, lesson 23

Vector Spaces and Coordinates Workshop

Practice in choosing and checking bases for the four spaces of a matrix, for coordinates in a new basis and for polynomial evaluation maps, using membership, independence and dimension counts.

  • Video 23
  • Vector Spaces and Coordinates Workshop

If the third row of a 3×33 \times 3 matrix AA is the sum of the first two, the third equation of Ax=0A\mathbf{x} = \mathbf{0} is redundant. Does that let us drop the third entry of every vector, or take the first two columns of the reduced matrix as a basis of the column space of AA? Neither is true. This workshop practices choosing a basis without being told which vectors to take, and then proving that the choice is right, for the four spaces of a matrix, for coordinates in a new basis and for a polynomial evaluation map.

Key terms

Verifying a proposed basis

Definition Let HH be a subspace of a vector space VV, and let v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k be proposed basis vectors. They form a basis of HH exactly when three checks pass.

  1. Membership. Each vi\mathbf{v}_i lies in HH.
  2. Independence. The only solution of c1v1+⋯+ckvk=0c_1\mathbf{v}_1 + \cdots + c_k\mathbf{v}_k = \mathbf{0} is c1=⋯=ck=0c_1 = \cdots = c_k = 0.
  3. Spanning. Every vector of HH is a linear combination of v1,…,vk\mathbf{v}_1, \dots, \mathbf{v}_k.

For a null space, the general solution of Ax=0A\mathbf{x} = \mathbf{0} written with its free variables proves spanning, and substituting each basis vector back into the equations confirms membership.

In plain words A basis must belong to the space, must contain no vector that is a combination of the others, and must reach every vector. Belonging alone is not enough, and neither is having the right number of vectors.

Example On this page a tuple written inline, such as (−2,1,1)(-2, 1, 1), stands for a column vector. Take

N=[10201−1111].N = \begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & -1 \\ 1 & 1 & 1 \end{bmatrix}.

The step R3→R3−R1−R2R_3 \to R_3 - R_1 - R_2 gives the echelon form

U=[10201−1000].U = \begin{bmatrix} 1 & 0 & 2 \\ 0 & 1 & -1 \\ 0 & 0 & 0 \end{bmatrix}.

So Nx=0N\mathbf{x} = \mathbf{0} means x1+2x3=0x_1 + 2x_3 = 0 and x2−x3=0x_2 - x_3 = 0. With x3=sx_3 = s free, every solution is s(−2,1,1)s(-2, 1, 1), which proves spanning, and a single nonzero vector is independent. Membership is the direct check

N[−211]=[−2+0+20+1−1−2+1+1]=[000].N\begin{bmatrix} -2 \\ 1 \\ 1 \end{bmatrix} = \begin{bmatrix} -2 + 0 + 2 \\ 0 + 1 - 1 \\ -2 + 1 + 1 \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \\ 0 \end{bmatrix}.

Hence Null⁡N=span⁡{(−2,1,1)}\operatorname{Null} N = \operatorname{span}\{(-2, 1, 1)\}. In the same way, N⊤w=0N^{\top}\mathbf{w} = \mathbf{0} reads w1+w3=0w_1 + w_3 = 0, w2+w3=0w_2 + w_3 = 0 and 2w1−w2+w3=02w_1 - w_2 + w_3 = 0. The first two equations give w1=w2=−w3w_1 = w_2 = -w_3, and the third then holds automatically, so Null⁡N⊤=span⁡{(−1,−1,1)}\operatorname{Null} N^{\top} = \operatorname{span}\{(-1, -1, 1)\}. As a check, minus row one minus row two plus row three of NN is the zero row.

Completeness by a dimension count

Definition Let HH be a subspace whose dimension kk is known from a separate argument. Then any kk linearly independent vectors in HH form a basis of HH, and any kk vectors in HH that span HH form a basis of HH. For a real m×nm \times n matrix AA of rank rr, the transpose A⊤A^{\top} also has rank rr, so the column space and the row space both have dimension rr. Rank-nullity applied to AA and to A⊤A^{\top} gives the dimensions of the two null spaces. Together,

dim⁡Col⁡A=dim⁡Row⁡A=r,dim⁡Null⁡A=n−r,dim⁡Null⁡A⊤=m−r,\begin{aligned} \dim \operatorname{Col} A &= \dim \operatorname{Row} A = r, \\[0.4em] \dim \operatorname{Null} A &= n - r, \\[0.4em] \dim \operatorname{Null} A^{\top} &= m - r, \end{aligned}

where Row⁡A\operatorname{Row} A and Null⁡A\operatorname{Null} A lie in Rn\mathbb{R}^n, and Col⁡A\operatorname{Col} A and Null⁡A⊤\operatorname{Null} A^{\top} lie in Rm\mathbb{R}^m.

In plain words Once you know how big a space is, the right number of independent vectors inside it is automatically enough. The count can replace the spanning proof, but only after membership and independence are settled.

Example The matrix NN above has rank 22 and m=n=3m = n = 3. The count predicts dim⁡Null⁡N=3−2=1\dim \operatorname{Null} N = 3 - 2 = 1 and dim⁡Null⁡N⊤=3−2=1\dim \operatorname{Null} N^{\top} = 3 - 2 = 1, matching the single vector found for each, while the column and row spaces are planes in R3\mathbb{R}^3. For a 3×53 \times 5 matrix AA of rank 22, which maps R5\mathbb{R}^5 to R3\mathbb{R}^3, the null space has dimension 5−2=35 - 2 = 3 inside R5\mathbb{R}^5, and the null space of A⊤A^{\top} has dimension 3−2=13 - 2 = 1 inside R3\mathbb{R}^3. Watch the conditions. In a two-dimensional subspace HH, a nonzero vector u\mathbf{u} and its multiple 2u2\mathbf{u} are two vectors of HH, yet they span only a line, because they are dependent.

Basis from the original columns

Definition To find a basis of Col⁡A\operatorname{Col} A, row reduce AA to an echelon form UU and note which columns contain pivots. The same columns of the original matrix AA form a basis of Col⁡A\operatorname{Col} A. This works because row operations do not change the solutions of Ax=0A\mathbf{x} = \mathbf{0}, and such a solution is exactly a dependence relation x1a1+⋯+xnan=0x_1\mathbf{a}_1 + \cdots + x_n\mathbf{a}_n = \mathbf{0} among the columns. So the columns of AA and of UU satisfy the same relations. In UU the pivot columns are independent and each non-pivot column is a combination of them, and therefore the same holds in AA. Row operations can change the column space itself. They do not change the row space, so the nonzero rows of UU form a basis of Row⁡A\operatorname{Row} A.

In plain words Use the reduced matrix to learn which columns to take, then take them from the original matrix. The reduced columns need not lie in the original column space.

Example For NN the pivots are in columns 11 and 22, so take c1=(1,0,1)\mathbf{c}_1 = (1, 0, 1) and c2=(0,1,1)\mathbf{c}_2 = (0, 1, 1) from NN. They span Col⁡N\operatorname{Col} N, since the third column is (2,−1,1)=2c1−c2(2, -1, 1) = 2\mathbf{c}_1 - \mathbf{c}_2. They are independent, since the first two entries of αc1+βc2\alpha\mathbf{c}_1 + \beta\mathbf{c}_2 are α\alpha and β\beta. Every vector of Col⁡N\operatorname{Col} N therefore has the form (α,β,α+β)(\alpha, \beta, \alpha + \beta), with third entry equal to the sum of the first two. The reduced column (1,0,0)(1, 0, 0) breaks this pattern, since 0≠1+00 \ne 1 + 0, so it is not even in Col⁡N\operatorname{Col} N. The row space has basis (1,0,2)(1, 0, 2) and (0,1,−1)(0, 1, -1), the nonzero rows of UU.

Reconstructing a vector from its coordinates

Definition Let B=(b1,…,bn)\mathcal{B} = (\mathbf{b}_1, \dots, \mathbf{b}_n) be an ordered basis of Rn\mathbb{R}^n with basis matrix B=[b1⋯bn]B = \begin{bmatrix} \mathbf{b}_1 & \cdots & \mathbf{b}_n \end{bmatrix}. If [v]B=(c1,…,cn)[\mathbf{v}]_{\mathcal{B}} = (c_1, \dots, c_n), then

v=c1b1+⋯+cnbn=B[v]B.\begin{aligned} \mathbf{v} &= c_1\mathbf{b}_1 + \cdots + c_n\mathbf{b}_n \\[0.4em] &= B[\mathbf{v}]_{\mathcal{B}}. \end{aligned}

Rebuilding v\mathbf{v} this way checks a computed coordinate column. The iith coordinate always multiplies the iith basis vector, so the order of the basis is part of the data. In an abstract space there is no basis matrix to multiply. In P2P_2 with an ordered basis (p1,p2,p3)(p_1, p_2, p_3), the reconstruction is p=c1p1+c2p2+c3p3p = c_1 p_1 + c_2 p_2 + c_3 p_3.

In plain words Coordinates are a recipe. Following the recipe must give back the original vector, and the recipe only makes sense together with the named basis in its stated order.

Example Let v=(4,2)\mathbf{v} = (4, 2) and B=(b1,b2)\mathcal{B} = (\mathbf{b}_1, \mathbf{b}_2) with b1=(1,1)\mathbf{b}_1 = (1, 1) and b2=(1,−1)\mathbf{b}_2 = (1, -1). Solving α+β=4\alpha + \beta = 4 and α−β=2\alpha - \beta = 2 gives α=3\alpha = 3 and β=1\beta = 1, so [v]B=(3,1)[\mathbf{v}]_{\mathcal{B}} = (3, 1). The reconstruction

[111−1][31]=[42]\begin{bmatrix} 1 & 1 \\ 1 & -1 \end{bmatrix}\begin{bmatrix} 3 \\ 1 \end{bmatrix} = \begin{bmatrix} 4 \\ 2 \end{bmatrix}

confirms it. In the reversed basis (b2,b1)(\mathbf{b}_2, \mathbf{b}_1) the same vector has coordinates (1,3)(1, 3). Reading the old column (3,1)(3, 1) in the reversed basis would give 3b2+b1=(4,−2)3\mathbf{b}_2 + \mathbf{b}_1 = (4, -2), a different vector.

Changing the sample points of an evaluation map

Definition For distinct real numbers s1s_1 and s2s_2, the evaluation map E(p)=(p(s1),p(s2))E(p) = (p(s_1), p(s_2)) from P2P_2 to R2\mathbb{R}^2 has the matrix

[1s1s121s2s22]\begin{bmatrix} 1 & s_1 & s_1^2 \\ 1 & s_2 & s_2^2 \end{bmatrix}

in the basis (1,t,t2)(1, t, t^2) and the standard basis of R2\mathbb{R}^2. Row ii lists the values of 11, tt and t2t^2 at sis_i. The first two columns are independent because s2−s1≠0s_2 - s_1 \ne 0, so the rank is 22 and the image is R2\mathbb{R}^2. Rank-nullity then gives nullity 3−2=13 - 2 = 1, and since (t−s1)(t−s2)(t - s_1)(t - s_2) is a nonzero polynomial that vanishes at both points, it spans ker⁡E\ker E. Replacing {s1,s2}\{s_1, s_2\} by any other set of two distinct points changes the matrix and the kernel, because the nonzero polynomials in ker⁡E\ker E vanish only at s1s_1 and s2s_2. If the two points coincide, the rows are equal and the rank drops to 11.

In plain words Measuring at a different pair of points changes which polynomials are invisible. With two different points on P2P_2 there is always exactly one invisible direction, the multiples of the quadratic (t−s1)(t−s2)(t - s_1)(t - s_2).

Example Let E2(p)=(p(0),p(2))E_2(p) = (p(0), p(2)). The images of 11, tt and t2t^2 are (1,1)(1, 1), (0,2)(0, 2) and (0,4)(0, 4), so the matrix is

[100124].\begin{bmatrix} 1 & 0 & 0 \\ 1 & 2 & 4 \end{bmatrix}.

The polynomial 1+2t+t21 + 2t + t^2 has coordinates (1,2,1)(1, 2, 1) and output (1,1+4+4)=(1,9)(1, 1 + 4 + 4) = (1, 9), which agrees with substituting t=2t = 2 directly. For a+bt+ct2a + bt + ct^2 the kernel requires a=0a = 0 and 2b+4c=02b + 4c = 0, so b=−2cb = -2c and ker⁡E2=span⁡{t2−2t}\ker E_2 = \operatorname{span}\{t^2 - 2t\}. The readings (1,9)(1, 9) require a=1a = 1 and b=4−2cb = 4 - 2c, so the polynomials with these readings are exactly

p(t)=1+4t+c(t2−2t)p(t) = 1 + 4t + c(t^2 - 2t)

with cc any real number. The value c=1c = 1 gives back 1+2t+t21 + 2t + t^2, and c=0c = 0 gives 1+4t1 + 4t.

Graph of a polynomial versus its coordinates

Definition The graph of a polynomial pp in P2P_2 is the set of points (t,p(t))(t, p(t)) in the plane, while its coordinate column [p]B[p]_{\mathcal{B}} in an ordered basis B\mathcal{B} of P2P_2 lies in R3\mathbb{R}^3. The polynomial is one vector of the three-dimensional space P2P_2. The graph shows that vector as a function, and the two axes of the drawing are not a basis of P2P_2. Two different members of P2P_2 can agree at two points, but not at three distinct points, because their difference is a nonzero polynomial of degree at most two and has at most two roots.

In plain words A curve on a flat page stands for a single vector of a three-dimensional space. Decide equality, independence and dimension from the coefficients, not from the shape of the drawing.

Example The graphs of 1+2t+t21 + 2t + t^2 and 1+4t1 + 4t both pass through (0,1)(0, 1) and (2,9)(2, 9), yet the coordinate columns in (1,t,t2)(1, t, t^2) are (1,2,1)(1, 2, 1) and (1,4,0)(1, 4, 0). Their difference t2−2tt^2 - 2t is the kernel direction of E2E_2. At t=1t = 1 the heights are 44 and 55, so a third sample point separates them.

Check yourself

  1. Find the coordinates of v=(1,5)\mathbf{v} = (1, 5) in the ordered basis B=(b1,b2)\mathcal{B} = (\mathbf{b}_1, \mathbf{b}_2) with b1=(1,2)\mathbf{b}_1 = (1, 2) and b2=(1,−1)\mathbf{b}_2 = (1, -1). Check by reconstruction, and give the coordinates in the reversed basis (b2,b1)(\mathbf{b}_2, \mathbf{b}_1).
Show the answer

Solve α+β=1\alpha + \beta = 1 and 2α−β=52\alpha - \beta = 5. Adding gives 3α=63\alpha = 6, so α=2\alpha = 2 and β=−1\beta = -1, and [v]B=(2,−1)[\mathbf{v}]_{\mathcal{B}} = (2, -1). The reconstruction 2(1,2)−(1,−1)=(1,5)2(1, 2) - (1, -1) = (1, 5) confirms it. In the reversed basis the coordinates are (−1,2)(-1, 2).

  1. Let
A=[121243364].A = \begin{bmatrix} 1 & 2 & 1 \\ 2 & 4 & 3 \\ 3 & 6 & 4 \end{bmatrix}.

Find bases of Col⁡A\operatorname{Col} A and Null⁡A\operatorname{Null} A and confirm them with a dimension count. Explain why the first two columns of AA are not a basis of Col⁡A\operatorname{Col} A, and why the pivot columns of the echelon form are not one either.

Show the answer

The steps R2→R2−2R1R_2 \to R_2 - 2R_1 and R3→R3−3R1R_3 \to R_3 - 3R_1, followed by R3→R3−R2R_3 \to R_3 - R_2, give

A→[121001001]→[121001000].\begin{aligned} A &\to \begin{bmatrix} 1 & 2 & 1 \\ 0 & 0 & 1 \\ 0 & 0 & 1 \end{bmatrix} \\[0.4em] &\to \begin{bmatrix} 1 & 2 & 1 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}. \end{aligned}

The pivots are in columns 11 and 33, so the rank is 22. The original columns (1,2,3)(1, 2, 3) and (1,3,4)(1, 3, 4) lie in Col⁡A\operatorname{Col} A and are independent, since neither is a multiple of the other. Because dim⁡Col⁡A=2\dim \operatorname{Col} A = 2, they form a basis. For the null space, the echelon rows say x3=0x_3 = 0 and x1+2x2+x3=0x_1 + 2x_2 + x_3 = 0, so x1=−2x2x_1 = -2x_2 and every solution is x2(−2,1,0)x_2(-2, 1, 0). Indeed A(−2,1,0)=(0,0,0)A(-2, 1, 0) = (0, 0, 0), and the nullity 3−2=13 - 2 = 1 matches.

The first two columns fail because (2,4,6)=2(1,2,3)(2, 4, 6) = 2(1, 2, 3), so they are dependent and span only a line. The echelon pivot columns (1,0,0)(1, 0, 0) and (1,1,0)(1, 1, 0) fail for a different reason. Every vector of Col⁡A\operatorname{Col} A has the form

α[123]+β[134]=[α+β2α+3β3α+4β],\alpha\begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} + \beta\begin{bmatrix} 1 \\ 3 \\ 4 \end{bmatrix} = \begin{bmatrix} \alpha + \beta \\ 2\alpha + 3\beta \\ 3\alpha + 4\beta \end{bmatrix},

whose third entry is the sum of the first two. The vector (1,0,0)(1, 0, 0) breaks this, so it is not in Col⁡A\operatorname{Col} A.

  1. Let G(p)=(p(1),p(2))G(p) = (p(1), p(2)) on P2P_2. Find a basis of ker⁡G\ker G, every pp with G(p)=(3,5)G(p) = (3, 5), and the one solution that also has p(0)=7p(0) = 7.
Show the answer

The matrix in the basis (1,t,t2)(1, t, t^2) is

[111124],\begin{bmatrix} 1 & 1 & 1 \\ 1 & 2 & 4 \end{bmatrix},

whose first two columns are independent, so the rank is 22 and the nullity is 3−2=13 - 2 = 1. The polynomial (t−1)(t−2)=t2−3t+2(t - 1)(t - 2) = t^2 - 3t + 2 is nonzero and vanishes at 11 and 22, so it is a basis of ker⁡G\ker G. A linear solution a+bta + bt needs a+b=3a + b = 3 and a+2b=5a + 2b = 5, so b=2b = 2 and a=1a = 1. The solutions are, for any real number cc,

p(t)=1+2t+c(t2−3t+2).p(t) = 1 + 2t + c(t^2 - 3t + 2).

The condition p(0)=1+2c=7p(0) = 1 + 2c = 7 gives c=3c = 3 and p(t)=7−7t+3t2p(t) = 7 - 7t + 3t^2. Check that p(1)=7−7+3=3p(1) = 7 - 7 + 3 = 3 and p(2)=7−14+12=5p(2) = 7 - 14 + 12 = 5. Three distinct sample points pin down a member of P2P_2, as the graph card predicts.

How this lesson connects