Unit 4, lesson 21

Vector Spaces of Polynomials and Matrices

The axioms that make a set with addition and scaling a vector space, why polynomials of degree at most two and 2-by-2 matrices qualify, and how coefficients and matrix units give them coordinates.

  • Video 21
  • Vector Spaces Beyond Arrows

The polynomials t2t^2 and −t2+t-t^2 + t both have degree two, yet their sum is tt, which has degree one. Did adding two vectors take us out of the space? The answer depends on which set of polynomials we chose. This lesson states the rules that make a set with addition and scaling a vector space, checks them for polynomials of degree at most two and for 2-by-2 matrices, and gives these new vectors coordinates.

Key terms

Vector space

Definition A real vector space is a set VV with two operations. Addition assigns to any u\mathbf{u} and v\mathbf{v} in VV an object u+v\mathbf{u} + \mathbf{v}, and scalar multiplication assigns to any real number aa and any u\mathbf{u} in VV an object aua\mathbf{u}. The vector space axioms below must hold for all u,v,w\mathbf{u}, \mathbf{v}, \mathbf{w} in VV and all real numbers aa and bb.

  1. The sum u+v\mathbf{u} + \mathbf{v} lies in VV (closure under addition).
  2. The multiple aua\mathbf{u} lies in VV (closure under scalar multiplication).
  3. Addition is commutative, u+v=v+u\mathbf{u} + \mathbf{v} = \mathbf{v} + \mathbf{u}.
  4. Addition is associative, (u+v)+w=u+(v+w)(\mathbf{u} + \mathbf{v}) + \mathbf{w} = \mathbf{u} + (\mathbf{v} + \mathbf{w}).
  5. There is a zero vector 0\mathbf{0} in VV with u+0=u\mathbf{u} + \mathbf{0} = \mathbf{u} for every u\mathbf{u}.
  6. Each u\mathbf{u} has an additive inverse −u-\mathbf{u} in VV with u+(−u)=0\mathbf{u} + (-\mathbf{u}) = \mathbf{0}.
  7. Scalar multiplication is associative, a(bu)=(ab)ua(b\mathbf{u}) = (ab)\mathbf{u}.
  8. Multiplying by one changes nothing, 1u=u1\mathbf{u} = \mathbf{u}.
  9. A scalar distributes over a sum of vectors, a(u+v)=au+ava(\mathbf{u} + \mathbf{v}) = a\mathbf{u} + a\mathbf{v}.
  10. A sum of scalars distributes over a vector, (a+b)u=au+bu(a + b)\mathbf{u} = a\mathbf{u} + b\mathbf{u}.

The members of VV are called vectors, whatever kind of object they are. Linear combinations, span, linear independence, bases and coordinates are defined in VV word for word as in Rn\mathbb{R}^n. If VV has a basis of nn vectors, then every basis of VV has nn vectors, and nn is the dimension dim⁡V\dim V. A subset of VV that contains 0\mathbf{0} and is closed under addition and scalar multiplication is a subspace, and with the same operations it is a vector space in its own right.

In plain words A vector is anything you can add and scale by the familiar rules. Arrows are one example, but the word asks only that the two operations behave as listed.

Example On this page a tuple written inline, such as (3,2)(3, 2), stands for a column vector. In R2\mathbb{R}^2 with the usual operations, every axiom comes down to real arithmetic in each component. For instance, a(u+v)=au+ava(\mathbf{u} + \mathbf{v}) = a\mathbf{u} + a\mathbf{v} holds because a(ui+vi)=aui+avia(u_i + v_i) = au_i + av_i for i=1,2i = 1, 2. By contrast, the set of all vectors (x,1)(x, 1) with the same operations is not a vector space. The sum (1,1)+(2,1)=(3,2)(1, 1) + (2, 1) = (3, 2) falls outside the set, and so does 0⋅(1,1)=(0,0)0 \cdot (1, 1) = (0, 0). Both closure axioms fail, and the zero vector is missing.

Polynomials of degree at most two

Definition The set P2P_2 consists of all polynomials

p(t)=a0+a1t+a2t2p(t) = a_0 + a_1 t + a_2 t^2

with real coefficients a0,a1,a2a_0, a_1, a_2, any of which may be zero. It contains the constants, the linear polynomials and the zero polynomial, whose coefficients are all zero. Two members are equal exactly when their corresponding coefficients are equal. For q(t)=b0+b1t+b2t2q(t) = b_0 + b_1 t + b_2 t^2 and a real number cc, addition and scalar multiplication act on the coefficients,

(p+q)(t)=(a0+b0)+(a1+b1)t+(a2+b2)t2,(cp)(t)=ca0+ca1t+ca2t2,\begin{aligned} (p + q)(t) &= (a_0 + b_0) + (a_1 + b_1)t \\[0.4em] &\quad + (a_2 + b_2)t^2, \\[0.4em] (cp)(t) &= ca_0 + ca_1 t + ca_2 t^2, \end{aligned}

which is the same as adding or scaling the values at every input tt. No power above t2t^2 appears, so both operations stay in P2P_2. Every other axiom follows coefficient by coefficient from the same law for real numbers. The zero vector is the zero polynomial, and the additive inverse of pp has every coefficient negated. With the same operations, the set of polynomials of degree exactly two is not a vector space.

In plain words The words “at most” do real work. They let the leading coefficients cancel, so sums and multiples never leave the set.

Example Take p(t)=2+3t−t2p(t) = 2 + 3t - t^2 and q(t)=1−t+2t2q(t) = 1 - t + 2t^2. Adding and scaling coefficients gives

p+q=3+2t+t2,−2p=−4−6t+2t2,\begin{aligned} p + q &= 3 + 2t + t^2, \\[0.4em] -2p &= -4 - 6t + 2t^2, \end{aligned}

and both lie in P2P_2. Now take t2t^2 and −t2+t-t^2 + t, which have degree exactly two. Their sum is tt, of degree one, and the multiple 0⋅t20 \cdot t^2 is the zero polynomial. Both results lie in P2P_2 but outside the set of polynomials of degree exactly two, so that set fails both closure axioms.

Coordinates of a polynomial

Definition The ordered list S=(1,t,t2)\mathcal{S} = (1, t, t^2) is a basis of P2P_2. It spans, since every member has the form a0⋅1+a1t+a2t2a_0 \cdot 1 + a_1 t + a_2 t^2, and it is linearly independent, since a0+a1t+a2t2a_0 + a_1 t + a_2 t^2 is the zero polynomial only when a0=a1=a2=0a_0 = a_1 = a_2 = 0. Hence dim⁡P2=3\dim P_2 = 3. If B=(p1,p2,p3)\mathcal{B} = (p_1, p_2, p_3) is any ordered basis of P2P_2, each pp in P2P_2 can be written in exactly one way as p=c1p1+c2p2+c3p3p = c_1 p_1 + c_2 p_2 + c_3 p_3. The coordinates of pp in B\mathcal{B} form the column

[p]B=[c1c2c3].[p]_{\mathcal{B}} = \begin{bmatrix} c_1 \\ c_2 \\ c_3 \end{bmatrix}.

In the basis S\mathcal{S} the coordinates are the coefficients, so [a0+a1t+a2t2]S=(a0,a1,a2)[a_0 + a_1 t + a_2 t^2]_{\mathcal{S}} = (a_0, a_1, a_2).

In plain words The polynomial is the vector, and the column is its description in one chosen basis. Changing the basis can change the column, but it never changes the polynomial. The graph of pp is drawn in a plane, but P2P_2 has three independent coefficient directions, so the dimension of a picture and the dimension of the space are different questions.

Example The polynomial p(t)=2+3t−t2p(t) = 2 + 3t - t^2 has [p]S=(2,3,−1)[p]_{\mathcal{S}} = (2, 3, -1). Now use B=(1,t−1,(t−1)2)\mathcal{B} = (1, t - 1, (t - 1)^2). Expanding a general combination gives

α+β(t−1)+γ(t−1)2=(α−β+γ)+(β−2γ)t+γt2.\begin{aligned} &\alpha + \beta(t - 1) + \gamma(t - 1)^2 \\[0.4em] &\quad = (\alpha - \beta + \gamma) \\[0.4em] &\qquad + (\beta - 2\gamma)t + \gamma t^2. \end{aligned}

Matching these coefficients with any target a0+a1t+a2t2a_0 + a_1 t + a_2 t^2 fixes γ\gamma, then β\beta, then α\alpha, with exactly one solution, so B\mathcal{B} is a basis. For our pp we get γ=−1\gamma = -1, then β−2γ=3\beta - 2\gamma = 3 gives β=1\beta = 1, and α−β+γ=2\alpha - \beta + \gamma = 2 gives α=4\alpha = 4. So [p]B=(4,1,−1)[p]_{\mathcal{B}} = (4, 1, -1). Reconstructing confirms it,

4+(t−1)−(t−1)2=4+t−1−t2+2t−1=2+3t−t2.\begin{aligned} &4 + (t - 1) - (t - 1)^2 \\[0.4em] &\quad = 4 + t - 1 - t^2 + 2t - 1 \\[0.4em] &\quad = 2 + 3t - t^2. \end{aligned}

Space of 2-by-2 matrices

Definition The set M2×2M_{2 \times 2} consists of all real 2×22 \times 2 matrices. Addition adds corresponding entries, and scalar multiplication multiplies every entry by the scalar. With these operations M2×2M_{2 \times 2} is a vector space, because each axiom holds entry by entry for real numbers. The zero vector is the zero matrix, and the additive inverse of a matrix negates all four entries. Matrix multiplication plays no part in this structure. In the same way the real m×nm \times n matrices form a vector space Mm×nM_{m \times n}. Matrices of different sizes cannot be added entrywise, so one space holds matrices of one fixed size.

In plain words Here a matrix is not acting on anything. It is a single vector, an array of four numbers that you add and scale one entry at a time.

Example Let

A=[2−134],B=[−2510].A = \begin{bmatrix} 2 & -1 \\ 3 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} -2 & 5 \\ 1 & 0 \end{bmatrix}.

Then

A+B=[0444],2A=[4−268].A + B = \begin{bmatrix} 0 & 4 \\ 4 & 4 \end{bmatrix}, \quad 2A = \begin{bmatrix} 4 & -2 \\ 6 & 8 \end{bmatrix}.

The axiom A+B=B+AA + B = B + A holds entry by entry. It says nothing about the products ABAB and BABA, which belong to a different operation and here are not equal.

Matrix units

Definition The matrix units of M2×2M_{2 \times 2} are

E11=[1000],E12=[0100],E21=[0010],E22=[0001].\begin{aligned} E_{11} &= \begin{bmatrix} 1 & 0 \\ 0 & 0 \end{bmatrix}, & E_{12} &= \begin{bmatrix} 0 & 1 \\ 0 & 0 \end{bmatrix}, \\[0.4em] E_{21} &= \begin{bmatrix} 0 & 0 \\ 1 & 0 \end{bmatrix}, & E_{22} &= \begin{bmatrix} 0 & 0 \\ 0 & 1 \end{bmatrix}. \end{aligned}

Each EijE_{ij} has a 11 in row ii and column jj and zeros elsewhere. In the order (E11,E12,E21,E22)(E_{11}, E_{12}, E_{21}, E_{22}) they form an ordered basis of M2×2M_{2 \times 2}, because every matrix satisfies

[abcd]=aE11+bE12+cE21+dE22,\begin{aligned} \begin{bmatrix} a & b \\ c & d \end{bmatrix} &= aE_{11} + bE_{12} \\[0.4em] &\quad + cE_{21} + dE_{22}, \end{aligned}

and this combination is the zero matrix only when a=b=c=d=0a = b = c = d = 0. Hence dim⁡M2×2=4\dim M_{2 \times 2} = 4, and the coordinate column of the matrix above is (a,b,c,d)(a, b, c, d). Likewise the mnmn matrix units EijE_{ij} with 1≤i≤m1 \le i \le m and 1≤j≤n1 \le j \le n form a basis of Mm×nM_{m \times n}, so dim⁡Mm×n=mn\dim M_{m \times n} = mn.

In plain words Each matrix unit switches on one entry. The dimension counts the entries that can vary independently, four here, not the number of rows.

Example The matrix AA above is

A=2E11−E12+3E21+4E22,A = 2E_{11} - E_{12} + 3E_{21} + 4E_{22},

so its coordinate column in this ordered basis is (2,−1,3,4)(2, -1, 3, 4). That column has four entries. It is not a column of AA, and it has nothing to do with AA multiplying a vector of R2\mathbb{R}^2. It describes the single vector AA in the four-dimensional space M2×2M_{2 \times 2}.

Check yourself

  1. Which of these subsets of P2P_2 are subspaces? (a) The polynomials with constant coefficient 00. (b) The polynomials with constant coefficient 11. For each subspace, give a basis and the dimension.
Show the answer

Set (a) is a subspace. It contains the zero polynomial, and adding or scaling polynomials of the form bt+ct2bt + ct^2 keeps the constant coefficient equal to 00. Every member is a combination of tt and t2t^2, and bt+ct2bt + ct^2 is the zero polynomial only when b=c=0b = c = 0. So (t,t2)(t, t^2) is a basis and the dimension is 22.

Set (b) is not a subspace. The zero polynomial has constant coefficient 00, so it is missing. Closure under addition fails too, since (1+t)+(1+t2)=2+t+t2(1 + t) + (1 + t^2) = 2 + t + t^2 has constant coefficient 22.

  1. Show that B=(1,1+t,t2)\mathcal{B} = (1, 1 + t, t^2) is a basis of P2P_2, and find the coordinates of p(t)=2+3t−t2p(t) = 2 + 3t - t^2 in it.
Show the answer

A general combination is

α+β(1+t)+γt2=(α+β)+βt+γt2.\begin{aligned} &\alpha + \beta(1 + t) + \gamma t^2 \\[0.4em] &\quad = (\alpha + \beta) + \beta t + \gamma t^2. \end{aligned}

It equals a+bt+ct2a + bt + ct^2 exactly when β=b\beta = b, γ=c\gamma = c and α=a−b\alpha = a - b. Every target has exactly one solution, so B\mathcal{B} spans P2P_2, and the zero polynomial comes only from α=β=γ=0\alpha = \beta = \gamma = 0, so B\mathcal{B} is independent. For pp we get β=3\beta = 3, γ=−1\gamma = -1 and α=2−3=−1\alpha = 2 - 3 = -1, so [p]B=(−1,3,−1)[p]_{\mathcal{B}} = (-1, 3, -1). Check that −1+3(1+t)−t2=2+3t−t2-1 + 3(1 + t) - t^2 = 2 + 3t - t^2. The polynomial is unchanged, and only its coordinate column differs from (2,3,−1)(2, 3, -1).

  1. A 2×22 \times 2 matrix is symmetric when its two off-diagonal entries are equal. Show that the symmetric matrices form a subspace of M2×2M_{2 \times 2} and find a basis and the dimension. Is (E11,E12,E22)(E_{11}, E_{12}, E_{22}) a basis of this subspace?
Show the answer

The zero matrix is symmetric. Adding two symmetric matrices gives equal off-diagonal entries b+b′b + b', and multiplying by kk gives equal entries kbkb, so the set is a subspace. Every symmetric matrix can be written as

[abbc]=aE11+b(E12+E21)+cE22.\begin{aligned} \begin{bmatrix} a & b \\ b & c \end{bmatrix} &= aE_{11} + b(E_{12} + E_{21}) \\[0.4em] &\quad + cE_{22}. \end{aligned}

The three matrices E11E_{11}, E12+E21E_{12} + E_{21} and E22E_{22} are symmetric and span the subspace. They are independent, because the (1,1)(1,1), (1,2)(1,2) and (2,2)(2,2) entries of the combination are aa, bb and cc. So the dimension is 33.

The list (E11,E12,E22)(E_{11}, E_{12}, E_{22}) is not a basis. Its middle matrix has off-diagonal entries 11 and 00, so it is not symmetric and does not even lie in the subspace.

How this lesson connects

It also uses polynomials, their coefficients and degree.