Linear AlgebraVector Spaces and Subspaces9 of 9
Vector Spaces and Subspaces · 9

Functions and Polynomials as Vectors

A polynomial like 3+2x+5x2\built{3 + 2x + 5x^2} graphs as a curved parabola rather than a straight arrow, so how can linear algebra treat curves and functions as vectors?

1

Polynomials as Vectors and the Standard Basis

A polynomial is a combination of building-block curves, and its coefficients are the coordinates of a column vector.

Polynomials as Vectors and the Standard Basis
x\htmlClass{lc-mute}{x}
y\htmlClass{lc-mute}{y}
z\htmlClass{lc-mute}{z}
3\htmlClass{lc-green}{3}
2\htmlClass{lc-pink}{2}
5\htmlClass{lc-violet}{5}
[325]\begin{bmatrix} \htmlClass{lc-green}{3} \\ \htmlClass{lc-pink}{2} \\ \htmlClass{lc-violet}{5} \end{bmatrix}
3+2x+5x2\htmlClass{lc-blue}{3 + 2x + 5x^2}
x\htmlClass{lc-mute}{x}

Because the powers 1\blockone{1}, x\blocktwo{x}, and x2\blockthree{x^2} never mix when we add or scale polynomials, they act as slot labels that keep the coefficients separated, just like ı^\blockone{\hat{\imath}}, ȷ^\blocktwo{\hat{\jmath}}, and k^\blockthree{\hat{k}} in three dimensions:

3(1)+2(x)+5(x2)⏟basis {1, x, x2}⟷[325]⏟coordinate vector\displaystyle \begin{aligned} \underbrace{\blockone{3(1)} + \blocktwo{2(x)} + \blockthree{5(x^2)}}_{\text{basis } \{\blockone{1}, \, \blocktwo{x}, \, \blockthree{x^2}\}} \longleftrightarrow \underbrace{\begin{bmatrix} \blockone{3} \\ \blocktwo{2} \\ \blockthree{5} \end{bmatrix}}_{\text{coordinate vector}} \end{aligned}

Because the standard basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} includes the constant function 1\blockone{1} along with x\blocktwo{x} and x2\blockthree{x^2}, the space of polynomials of degree up to 22 has dimension 33, not 22.

Try dragging the three basis curves to see how the flat line c1(1)\blockone{c_1(1)}, the slanted line c2x\blocktwo{c_2 x}, and the basic parabola c3x2\blockthree{c_3 x^2} stack up to build the parabola.

A polynomial curve adds the heights of a flat line, a slanted line, and a parabola, and its coordinates just tell you how much of each shape you use.
2

Testing Polynomial Independence with Coordinates

We want to know whether the three polynomials 1+x\blockone{1 + x}, 1−x+x2\blocktwo{1 - x + x^2}, and 3+x+x2\blockthree{3 + x + x^2} are linearly independent and form a basis for the space of polynomials of degree up to 22, without trying to guess from their graphs.

Testing Polynomial Independence with Coordinates
1+x\htmlClass{lc-green}{1 + x}
1−x+x2\htmlClass{lc-pink}{1 - x + x^2}
3+x+x2\htmlClass{lc-violet}{3 + x + x^2}
x\htmlClass{lc-mute}{x}
independent?\text{independent?}
span?\text{span?}
basis?\text{basis?}
Text solution
Write each polynomial as a coordinate vector in {1,x,x2}\{1, x, x^2\}Read off the coefficients of 11, xx, and x2x^2 in order, placing a 00 in any missing power's slot:
1+x↔[110],1−x+x2↔[1−11],3+x+x2↔[311]\displaystyle \begin{aligned} \blockone{1 + x} &\leftrightarrow \blockone{\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}}, \\ \blocktwo{1 - x + x^2} &\leftrightarrow \blocktwo{\begin{bmatrix} 1 \\ -1 \\ 1 \end{bmatrix}}, \\ \blockthree{3 + x + x^2} &\leftrightarrow \blockthree{\begin{bmatrix} 3 \\ 1 \\ 1 \end{bmatrix}} \end{aligned}
Check whether one column is a combination of the othersCompare the three columns (or row-reduce them in a matrix) to see if the first two build the third:
2[110]+1[1−11]=[311]\displaystyle \blockone{2\begin{bmatrix} 1 \\ 1 \\ 0 \end{bmatrix}} + \blocktwo{1\begin{bmatrix} 1 \\ -1 \\ 1 \end{bmatrix}} = \built{\begin{bmatrix} 3 \\ 1 \\ 1 \end{bmatrix}}

So 2(1+x)+(1−x+x2)=3+x+x2\blockone{2(1 + x)} + \blocktwo{(1 - x + x^2)} = \blockthree{3 + x + x^2}, which means the third polynomial is built from the first two: the three polynomials are linearly dependent and only span 22 directions, so they do not form a basis for the 33-dimensional space.

3

Change of Basis with Shifted Polynomials

The standard basis {1,x,x2}\{1, x, x^2\} centers a polynomial around x=0x = 0, but to see how 3+2x+5x2\built{3 + 2x + 5x^2} behaves near x=1x = 1, we want to rewrite that same polynomial in the shifted basis {1,x−1,(x−1)2}\{\blockone{1}, \blocktwo{x - 1}, \blockthree{(x - 1)^2}\}.

Change of Basis with Shifted Polynomials
3+2x+5x2=c1(1)+c2(x−1)+c3(x−1)2c1, c2, c3=  ?\displaystyle \begin{aligned} \built{3 + 2x + 5x^2} &= \blockone{c_1(1)} \\ &\quad + \blocktwo{c_2(x - 1)} \\ &\quad + \blockthree{c_3(x - 1)^2} \\[4pt] \blockone{c_1},\ \blocktwo{c_2},\ \blockthree{c_3} &= \;? \end{aligned}
Text solution
Write the shifted basis functions in {1,x,x2}\{1, x, x^2\} coordinatesExpand each shifted basis polynomial so its standard coordinate vector becomes a column of the change-of-basis matrix:
1↔[100],x−1=−1+x↔[−110],(x−1)2=1−2x+x2↔[1−21]\displaystyle \begin{aligned} \blockone{1} &\leftrightarrow \blockone{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}}, \\ \blocktwo{x - 1} = \blocktwo{-1 + x} &\leftrightarrow \blocktwo{\begin{bmatrix} -1 \\ 1 \\ 0 \end{bmatrix}}, \\ \blockthree{(x - 1)^2} = \blockthree{1 - 2x + x^2} &\leftrightarrow \blockthree{\begin{bmatrix} 1 \\ -2 \\ 1 \end{bmatrix}} \end{aligned}
Set up the change-of-basis equationFind the shifted coordinate vector [c1c2c3]\begin{bmatrix} \blockone{c_1} \\ \blocktwo{c_2} \\ \blockthree{c_3} \end{bmatrix} that gives the standard coordinate vector [325]\built{\begin{bmatrix} 3 \\ 2 \\ 5 \end{bmatrix}}:
[1−1101−2001]⏟change-of-basis matrix[c1c2c3]=[325]\displaystyle \underbrace{\begin{bmatrix} \blockone{1} & \blocktwo{-1} & \blockthree{1} \\ \blockone{0} & \blocktwo{1} & \blockthree{-2} \\ \blockone{0} & \blocktwo{0} & \blockthree{1} \end{bmatrix}}_{\text{change-of-basis matrix}} \begin{bmatrix} \blockone{c_1} \\ \blocktwo{c_2} \\ \blockthree{c_3} \end{bmatrix} = \built{\begin{bmatrix} 3 \\ 2 \\ 5 \end{bmatrix}}
Solve from the bottom row upBecause 1\blockone{1} has no xx term and only (x−1)2\blockthree{(x - 1)^2} contains an x2x^2 term, the matrix is upper triangular and gives one coordinate at a time from bottom to top:
c3=5c2−2(5)=2  ⟹  c2=12c1−12+5=3  ⟹  c1=10\displaystyle \begin{aligned} \blockthree{c_3} &= 5 \\ \blocktwo{c_2} - \blockthree{2(5)} = \built{2} \implies \blocktwo{c_2} &= 12 \\ \blockone{c_1} - \blocktwo{12} + \blockthree{5} = \built{3} \implies \blockone{c_1} &= 10 \end{aligned}

So the shifted coordinate vector is [10125]\begin{bmatrix} \blockone{10} \\ \blocktwo{12} \\ \blockthree{5} \end{bmatrix}, which rewrites 3+2x+5x2\built{3 + 2x + 5x^2} as 10+12(x−1)+5(x−1)2\blockone{10} + \blocktwo{12(x - 1)} + \blockthree{5(x - 1)^2}.

You can check the first shifted coordinate in your head by plugging x=1x = 1 into both sides: every (x−1)(x - 1) term becomes 00 on the right, leaving c1=10\blockone{c_1} = 10 to match 3+2(1)+5(1)2=10\built{3 + 2(1) + 5(1)^2} = 10.

Slide the center point x=ax = a to see the shifted basis curves 1\blockone{1}, x−a\blocktwo{x - a}, and (x−a)2\blockthree{(x - a)^2} move along the axis and the coordinates [c1c2c3]\begin{bmatrix} \blockone{c_1} \\ \blocktwo{c_2} \\ \blockthree{c_3} \end{bmatrix} update while the parabola itself stays still.

Shifting the basis center changes the coordinates without moving the parabola, and the top coordinate is always the parabola's height at the center.
4

Subspaces of Polynomials

Now suppose we keep only the polynomials of degree up to 22 that pass through a required height at x=1x = 1. We want to know when a point rule like p(1)=4p(1) = 4 or p(1)=0p(1) = 0 defines a subspace, and how to find its basis and dimension.

Subspaces of Polynomials
A: p(1)=0\text{A: } p(1) = 0
B: p(1)=4\text{B: } p(1) = 4
1\htmlClass{lc-mute}{1}
4\htmlClass{lc-mute}{4}
1\htmlClass{lc-mute}{1}
subspace?\text{subspace?}
subspace?\text{subspace?}
Text solution
Test closure under addition and scaling at x=1x = 1Adding two polynomials with p(1)=4\blockone{p(1)} = 4 and q(1)=4\blocktwo{q(1)} = 4 doubles their height at x=1x = 1 to 4+4=8≠4\blockone{4} + \blocktwo{4} = \fails{8 \neq 4} (failing closure), whereas height 00 stays at 00 when added or scaled:
p(1)+q(1)=0+0=0,k⋅p(1)=k⋅0=0\displaystyle \begin{aligned} \blockone{p(1)} + \blocktwo{q(1)} &= \blockone{0} + \blocktwo{0} = \built{0}, \\ k \cdot \blockone{p(1)} &= k \cdot \blockone{0} = 0 \end{aligned}
Turn the point rule p(1)=0p(1) = 0 into a coordinate equationWrite p(x)=a+bx+cx2p(x) = \blockone{a} + \blocktwo{bx} + \blockthree{cx^2} and plug in x=1x = 1 so the condition on the curve becomes an equation that fixes a\blockone{a} in terms of the free coordinates b\blocktwo{b} and c\blockthree{c}:
a+b(1)+c(1)2=0  ⟹  a=−b−c\displaystyle \begin{aligned} \blockone{a} + \blocktwo{b(1)} + \blockthree{c(1)^2} &= 0 \\ \implies \blockone{a} &= \blocktwo{-b} - \blockthree{c} \end{aligned}
Substitute into the coordinate vector and split by the free variablesReplace a\blockone{a} inside [abc]\begin{bmatrix} \blockone{a} \\ \blocktwo{b} \\ \blockthree{c} \end{bmatrix} and separate the column by b\blocktwo{b} and c\blockthree{c} to find the basis vectors:
[abc]=[−b−cbc]=b[−110]+c[−101]\displaystyle \begin{aligned} \begin{bmatrix} \blockone{a} \\ \blocktwo{b} \\ \blockthree{c} \end{bmatrix} &= \begin{bmatrix} \blocktwo{-b} - \blockthree{c} \\ \blocktwo{b} \\ \blockthree{c} \end{bmatrix} \\ &= \blocktwo{b\begin{bmatrix} -1 \\ 1 \\ 0 \end{bmatrix}} + \blockthree{c\begin{bmatrix} -1 \\ 0 \\ 1 \end{bmatrix}} \end{aligned}

Translating those two columns back using {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} gives the basis {x−1,x2−1}\{\blocktwo{x - 1}, \blockthree{x^2 - 1}\} (or {x−1,(x−1)2}\{\blocktwo{x - 1}, \blockthree{(x - 1)^2}\} by dropping 1\blockone{1} from the shifted basis), and pinning one point on the graph drops the dimension from 33 down to 22.

Move the pin at x=1x = 1 up and down to see why the sum of two pinned curves only stays on the pin when the pin sits at height 00.

Adding two curves that share a pin puts their sum at twice the pin’s height, so the sum only stays on the pin at height zero.
5

General Functions as Infinite-Slot Vectors

Smooth functions like sin⁡(x)\sin(x) and exe^x aren't built from a finite list of powers like 1\blockone{1}, x\blocktwo{x}, and x2\blockthree{x^2}, so to treat general functions as vectors we need a direct way to see any curve f(x)\blockone{f(x)} as a column of numbers.

General Functions as Infinite-Slot Vectors
0\htmlClass{lc-mute}{0}
1\htmlClass{lc-mute}{1}
f(x)\htmlClass{lc-green}{f(x)}
x\htmlClass{lc-mute}{x}
1xx2[???]\begin{matrix} \htmlClass{lc-green}{1} \\ \htmlClass{lc-pink}{x} \\ \htmlClass{lc-violet}{x^2} \end{matrix} \begin{bmatrix} \htmlClass{lc-orange}{?} \\ \htmlClass{lc-orange}{?} \\ \htmlClass{lc-orange}{?} \end{bmatrix}

Instead of one slot per power of xx, a general function has one slot for every location xx along the axis, storing the graph's height f(x)\blockone{f(x)} in slot xx just like an array stores v[i]v[i] at index ii:

f(x)+g(x)⟷add heights f(x) and g(x) at every slot x\displaystyle \blockone{f(x)} + \blocktwo{g(x)} \longleftrightarrow \text{add heights } \blockone{f(x)} \text{ and } \blocktwo{g(x)} \\ \text{ at every slot } x

Pull the curve up and down between x=0x = 0 and x=1x = 1 to see how the height at each location xx is stored in its matching slot in the column vector.

Each spot along the curve has its own slot in the column vector, holding the graph's height there.
6

Testing Linear Independence of Functions

Because functions like 1\blockone{1}, sin⁡(x)\blocktwo{\sin(x)}, and cos⁡(x)\blockthree{\cos(x)} have infinitely many xx slots instead of a 33-number coordinate vector we can row-reduce, we need a way to test whether a set of general functions is linearly independent.

c1f(x)+c2g(x)\htmlClass{lc-green}{c_1 f(x)} + \htmlClass{lc-pink}{c_2 g(x)}
x=1x = 1
x\htmlClass{lc-mute}{x}
the zero function\text{the zero function}
0\htmlClass{lc-blue}{0}
0\htmlClass{lc-blue}{0}
0\htmlClass{lc-blue}{0}
0\htmlClass{lc-blue}{0}
0\htmlClass{lc-blue}{0}
0\htmlClass{lc-blue}{0}
x\htmlClass{lc-mute}{x}
Testing Linear Independence of Functions
c1(1)+c2sin⁡x+c3cos⁡x=0\htmlClass{lc-green}{c_1(1)} + \htmlClass{lc-pink}{c_2 \sin x} + \htmlClass{lc-violet}{c_3 \cos x} = \htmlClass{lc-blue}{0}
independent?\text{independent?}
1\htmlClass{lc-green}{1}
sin⁡x\htmlClass{lc-pink}{\sin x}
cos⁡x\htmlClass{lc-violet}{\cos x}
Text solution
Set a combination equal to the zero function across all xxRequire the weighted combination of 1\blockone{1}, sin⁡(x)\blocktwo{\sin(x)}, and cos⁡(x)\blockthree{\cos(x)} to equal 0\built{0} in every single xx slot at the same time:
c1(1)+c2sin⁡(x)+c3cos⁡(x)=0⏟0 at every x\displaystyle \begin{aligned} &\blockone{c_1(1)} + \blocktwo{c_2\sin(x)} + \blockthree{c_3\cos(x)} \\ &\quad = \underbrace{\built{0}}_{\text{0 at every } x} \end{aligned}
Plug in three convenient xx valuesBecause the equation must hold at every xx, plug in three angles where sin⁡(x)\blocktwo{\sin(x)} and cos⁡(x)\blockthree{\cos(x)} are simply 00, 11, or −1-1:
x=0:c1+c3=0x=π2:c1+c2=0x=π:c1−c3=0\displaystyle \begin{aligned} x = 0 &: \quad \blockone{c_1} + \blockthree{c_3} = 0 \\ x = \tfrac{\pi}{2} &: \quad \blockone{c_1} + \blocktwo{c_2} = 0 \\ x = \pi &: \quad \blockone{c_1} - \blockthree{c_3} = 0 \end{aligned}
Solve the resulting system for the weightsAdd the first and third equations to find c1\blockone{c_1}, then substitute back to find c3\blockthree{c_3} and c2\blocktwo{c_2}:
2c1=0  ⟹  c1=0,c3=0,c2=0\displaystyle \begin{aligned} \blockone{2c_1} &= 0 \implies \blockone{c_1} = 0, \\ \blockthree{c_3} &= 0, \quad \blocktwo{c_2} = 0 \end{aligned}

Because c1=c2=c3=0\blockone{c_1} = \blocktwo{c_2} = \blockthree{c_3} = 0 is the only solution that works even at those three locations, the functions 1\blockone{1}, sin⁡(x)\blocktwo{\sin(x)}, and cos⁡(x)\blockthree{\cos(x)} are linearly independent.

For 1\blockone{1}, sin⁡2(x)\blocktwo{\sin^2(x)}, and cos⁡2(x)\blockthree{\cos^2(x)}, however, the trig identity sin⁡2(x)+cos⁡2(x)=1\blocktwo{\sin^2(x)} + \blockthree{\cos^2(x)} = \blockone{1} holds at every xx, which gives nonzero weights that cancel across the entire axis:

(−1)(1)+1sin⁡2(x)+1cos⁡2(x)\displaystyle \blockone{(-1)(1)} + \blocktwo{1\sin^2(x)} + \blockthree{1\cos^2(x)} =0for all x\displaystyle = \built{0} \quad \text{for all } x

So cos⁡2(x)=1−sin⁡2(x)\blockthree{\cos^2(x)} = \blockone{1} - \blocktwo{\sin^2(x)} is built out of the first two functions, making 1\blockone{1}, sin⁡2(x)\blocktwo{\sin^2(x)}, and cos⁡2(x)\blockthree{\cos^2(x)} linearly dependent.

7

Derivatives, Dot Products, and Fourier Series

Once curves and functions are vectors, operations from linear algebra, like multiplying by a matrix, taking a dot product, and projecting onto perpendicular basis vectors, carry over to calculus and waves.

Derivatives, Dot Products, and Fourier Series
ddx\dfrac{d}{dx}
1\htmlClass{lc-green}{1}
x\htmlClass{lc-pink}{x}
x2\htmlClass{lc-violet}{x^2}
?\htmlClass{lc-green}{?}
?\htmlClass{lc-pink}{?}
?\htmlClass{lc-violet}{?}

Key concepts

For polynomials of degree up to nn, translate each polynomial directly into its (n+1)(n + 1)-slot coordinate vector in {1,x,x2,…,xn}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}, \dots, x^n\}, remembering the constant 1\blockone{1} slot and putting 00 in the slot of any missing power, so p(x)=4−3x2p(x) = \blockone{4} - \blockthree{3x^2} becomes [40−3]\begin{bmatrix} \blockone{4} \\ \blocktwo{0} \\ \blockthree{-3} \end{bmatrix} in a 33-dimensional space. Once polynomials are columns, testing linear independence is just checking whether one column is a combination of the others. To switch to a shifted basis {1,x−a,(x−a)2}\{\blockone{1}, \blocktwo{x - a}, \blockthree{(x - a)^2}\}, expand the shifted basis polynomials into the columns of an upper-triangular change-of-basis matrix and solve from the bottom row up. And when a point rule restricts which polynomials are allowed, p(a)=0p(a) = 0 defines a subspace (find its basis by turning p(a)=0p(a) = 0 into one equation on the coefficients of pp and splitting the column by its free variables), whereas p(a)=kp(a) = k with k≠0k \neq 0 fails closure because adding two curves gives height 2k\fails{2k}.

When functions like sin⁡(x)\sin(x) and cos⁡(x)\cos(x) aren't polynomials, view f(x)\blockone{f(x)} as an infinite-slot vector storing the height f(x)\blockone{f(x)} at each slot xx. In this space, the zero vector is the flat line equal to 00 at every xx at once, so never claim two functions like 1\blockone{1} and x\blocktwo{x} are dependent just because 1−x=0\blockone{1} - \blocktwo{x} = 0 at a single point x=1x = 1. To prove functions are linearly independent, set c1f(x)+c2g(x)+c3h(x)=0\blockone{c_1 f(x)} + \blocktwo{c_2 g(x)} + \blockthree{c_3 h(x)} = \built{0} and plug in a few convenient xx values that force c1=c2=c3=0\blockone{c_1} = \blocktwo{c_2} = \blockthree{c_3} = 0; but before plugging in numbers, check whether an identity like sin⁡2(x)+cos⁡2(x)=1\blocktwo{\sin^2(x)} + \blockthree{\cos^2(x)} = \blockone{1} already links the functions across all xx, which makes them linearly dependent right away.

8

Practice

1

In the space of polynomials of degree up to 2 with standard basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\}, write the coordinate vectors of p(x)=4−3x2p(x) = 4 - 3x^2 and q(x)=1+2x+x2q(x) = 1 + 2x + x^2, find the coordinate vector and polynomial for 2p(x)−q(x)2p(x) - q(x), and state the dimension of this space.

In p(x)=4−3x2p(x) = 4 - 3x^2, what is the coefficient of the middle basis function x\blocktwo{x}?

Matching the slots to {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} in order gives:
p(x)=4+0x−3x2↔[40−3],q(x)=1+2x+1x2↔[121]\displaystyle \begin{aligned} p(x) &= \blockone{4} + \blocktwo{0x} - \blockthree{3x^2} \leftrightarrow \begin{bmatrix} \blockone{4} \\ \blocktwo{0} \\ \blockthree{-3} \end{bmatrix}, \\ q(x) &= \blockone{1} + \blocktwo{2x} + \blockthree{1x^2} \leftrightarrow \begin{bmatrix} \blockone{1} \\ \blocktwo{2} \\ \blockthree{1} \end{bmatrix} \end{aligned}
(Watch out for skipping the missing x\blocktwo{x} term in 4−3x2\blockone{4} - \blockthree{3x^2} and writing [4−30]\fails{\begin{bmatrix} 4 \\ -3 \\ 0 \end{bmatrix}}, which shifts −3\blockthree{-3} into the x\blocktwo{x} slot and gives the wrong combination 7−8x−x2\fails{7 - 8x - x^2}.)
Now scale and subtract slot by slot:
2[40−3]−[121]=[80−6]−[121]=[7−2−7]↔7−2x−7x2\displaystyle \begin{aligned} & 2\begin{bmatrix} \blockone{4} \\ \blocktwo{0} \\ \blockthree{-3} \end{bmatrix} - \begin{bmatrix} \blockone{1} \\ \blocktwo{2} \\ \blockthree{1} \end{bmatrix} = \begin{bmatrix} \blockone{8} \\ \blocktwo{0} \\ \blockthree{-6} \end{bmatrix} - \begin{bmatrix} \blockone{1} \\ \blocktwo{2} \\ \blockthree{1} \end{bmatrix} \\ &\quad = \begin{bmatrix} \blockone{7} \\ \blocktwo{-2} \\ \blockthree{-7} \end{bmatrix} \leftrightarrow \blockone{7} - \blocktwo{2x} - \blockthree{7x^2} \end{aligned}
Because the basis {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} has 33 basis functions (don't forget the constant function 1\blockone{1} and answer 2\fails{2} from the highest power x2\blockthree{x^2}), the dimension of the space is 33.
2

Determine whether the three polynomials 1+2x\blockone{1 + 2x}, 2+x+x2\blocktwo{2 + x + x^2}, and 5+4x+2x2\blockthree{5 + 4x + 2x^2} are linearly independent and whether they form a basis for the space of polynomials of degree up to 2.

Write each polynomial as a column in {1,x,x2}\{1, x, x^2\}: how many of [211]\blocktwo{\begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix}} do you need to match the bottom (x2x^2) slot of [542]\blockthree{\begin{bmatrix} 5 \\ 4 \\ 2 \end{bmatrix}}?

In the standard basis {1,x,x2}\{1, x, x^2\}, the three coordinate vectors are:
[120],[211],[542]\displaystyle \blockone{\begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix}}, \quad \blocktwo{\begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix}}, \quad \blockthree{\begin{bmatrix} 5 \\ 4 \\ 2 \end{bmatrix}}
(Don't stop after checking that no column is a multiple of another and assume 33 polynomials in a 33-dimensional space must form a basis. Check whether the first two columns combine to make the third.)
Matching the bottom slot takes 2\blocktwo{2} of the second column, and adding 1\blockone{1} of the first column gives:
1[120]+2[211]=[542]\displaystyle \blockone{1\begin{bmatrix} 1 \\ 2 \\ 0 \end{bmatrix}} + \blocktwo{2\begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix}} = \built{\begin{bmatrix} 5 \\ 4 \\ 2 \end{bmatrix}}
Because (1+2x)+2(2+x+x2)\blockone{(1 + 2x)} + \blocktwo{2(2 + x + x^2)} =5+4x+2x2{}= \blockthree{5 + 4x + 2x^2}, the polynomials are linearly dependent, do not span the 33-dimensional space, and do not form a basis.
3

Write the change-of-basis matrix from the shifted basis {1,x−2,(x−2)2}\{\blockone{1}, \blocktwo{x - 2}, \blockthree{(x - 2)^2}\} to the standard basis {1,x,x2}\{1, x, x^2\}, and use it to rewrite 5−6x+2x2\built{5 - 6x + 2x^2} in the shifted basis.

Expand (x−2)2\blockthree{(x - 2)^2} into {1,x,x2}\{1, x, x^2\} to form the third column, then solve the system from the bottom row (x2x^2 slot) up.

Expanding each shifted basis function into {1,x,x2}\{1, x, x^2\} coordinates gives:
1↔[100],x−2=−2+x↔[−210],(x−2)2=4−4x+x2↔[4−41]\displaystyle \begin{aligned} \blockone{1} &\leftrightarrow \blockone{\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}}, \\ \blocktwo{x - 2} = \blocktwo{-2 + x} &\leftrightarrow \blocktwo{\begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}}, \\ \blockthree{(x - 2)^2} = \blockthree{4 - 4x + x^2} &\leftrightarrow \blockthree{\begin{bmatrix} 4 \\ -4 \\ 1 \end{bmatrix}} \end{aligned}
(Be careful not to expand (x−2)2\blockthree{(x - 2)^2} as 4+x2\fails{4 + x^2} without the −4x\blockthree{-4x} middle term, which leaves a 00 in the second row and gives c2=−6,c1=−15\blocktwo{c_2} = \fails{-6}, \blockone{c_1} = \fails{-15}.)
Putting these into columns gives the change-of-basis matrix, and we solve for the shifted coordinates [c1c2c3]\begin{bmatrix} \blockone{c_1} \\ \blocktwo{c_2} \\ \blockthree{c_3} \end{bmatrix} that produce [5−62]\built{\begin{bmatrix} 5 \\ -6 \\ 2 \end{bmatrix}}:
[1−2401−4001][c1c2c3]=[5−62]\displaystyle \begin{bmatrix} \blockone{1} & \blocktwo{-2} & \blockthree{4} \\ \blockone{0} & \blocktwo{1} & \blockthree{-4} \\ \blockone{0} & \blocktwo{0} & \blockthree{1} \end{bmatrix}\begin{bmatrix} \blockone{c_1} \\ \blocktwo{c_2} \\ \blockthree{c_3} \end{bmatrix} = \built{\begin{bmatrix} 5 \\ -6 \\ 2 \end{bmatrix}}
(Don't multiply the matrix directly by [5−62]\built{\begin{bmatrix} 5 \\ -6 \\ 2 \end{bmatrix}}, which converts in the wrong direction and gives [25−142]\fails{\begin{bmatrix} 25 \\ -14 \\ 2 \end{bmatrix}}.)
Solving from the bottom row up:
c3=2c2−4(2)=−6  ⟹  c2=2c1−2(2)+4(2)=5  ⟹  c1=1\displaystyle \begin{aligned} \blockthree{c_3} &= 2 \\ \blocktwo{c_2} - \blockthree{4(2)} = \built{-6} \implies \blocktwo{c_2} &= 2 \\ \blockone{c_1} - \blocktwo{2(2)} + \blockthree{4(2)} = \built{5} \implies \blockone{c_1} &= 1 \end{aligned}
The shifted coordinate vector is [122]\begin{bmatrix} \blockone{1} \\ \blocktwo{2} \\ \blockthree{2} \end{bmatrix}, which is 1+2(x−2)+2(x−2)2\blockone{1} + \blocktwo{2(x - 2)} + \blockthree{2(x - 2)^2}.
4

In the space of polynomials of degree up to 2, explain whether the rule p(2)=3p(2) = 3 defines a subspace, then show that the rule p(2)=0p(2) = 0 defines a subspace and find a basis and the dimension for it.

For p(2)=0p(2) = 0, plug x=2x = 2 into p(x)=a+bx+cx2p(x) = \blockone{a} + \blocktwo{bx} + \blockthree{cx^2}: what does a\blockone{a} equal in terms of b\blocktwo{b} and c\blockthree{c}?

The rule p(2)=3p(2) = 3 does not define a subspace because the zero polynomial has height 0≠3\fails{0 \neq 3} at x=2x = 2, and adding two polynomials with p(2)=3\blockone{p(2)} = 3 and q(2)=3\blocktwo{q(2)} = 3 gives p(2)+q(2)=6≠3\blockone{p(2)} + \blocktwo{q(2)} = \fails{6 \neq 3}.
The rule p(2)=0p(2) = 0 defines a subspace because the zero polynomial has height 0=00 = 0, addition preserves height 0+0=0\blockone{0} + \blocktwo{0} = \built{0}, and scaling preserves height k⋅0=0k \cdot \blockone{0} = 0. Writing p(x)=a+bx+cx2p(x) = \blockone{a} + \blocktwo{bx} + \blockthree{cx^2} and plugging in x=2x = 2 gives:
a+2b+4c=0  ⟹  a=−2b−4c\displaystyle \begin{aligned} \blockone{a} + \blocktwo{2b} + \blockthree{4c} &= 0 \\ \implies \blockone{a} &= \blocktwo{-2b} - \blockthree{4c} \end{aligned}
(Watch out for forgetting to square 22 on the cx2\blockthree{cx^2} term and writing a+2b+2c=0\blockone{a} + \blocktwo{2b} + \fails{2c} = 0, which gives the wrong second basis polynomial x2−2\fails{x^2 - 2}.)
Substituting a=−2b−4c\blockone{a} = \blocktwo{-2b} - \blockthree{4c} into the coordinate vector and splitting by b\blocktwo{b} and c\blockthree{c}:
[abc]=[−2b−4cbc]=b[−210]+c[−401]\displaystyle \begin{aligned} \begin{bmatrix} \blockone{a} \\ \blocktwo{b} \\ \blockthree{c} \end{bmatrix} &= \begin{bmatrix} \blocktwo{-2b} - \blockthree{4c} \\ \blocktwo{b} \\ \blockthree{c} \end{bmatrix} \\ &= \blocktwo{b\begin{bmatrix} -2 \\ 1 \\ 0 \end{bmatrix}} + \blockthree{c\begin{bmatrix} -4 \\ 0 \\ 1 \end{bmatrix}} \end{aligned}
Translating back into {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} gives a basis of {x−2,x2−4}\{\blocktwo{x - 2}, \blockthree{x^2 - 4}\} (or {x−2,(x−2)2}\{\blocktwo{x - 2}, \blockthree{(x - 2)^2}\}), and the dimension is 22.
5

Test whether the functions x\blockone{x}, sin⁡(x)\blocktwo{\sin(x)}, and cos⁡(x)\blockthree{\cos(x)} are linearly independent by setting a combination equal to the zero function and plugging in three convenient values of xx.

In c1x+c2sin⁡(x)+c3cos⁡(x)=0\blockone{c_1 x} + \blocktwo{c_2 \sin(x)} + \blockthree{c_3 \cos(x)} = \built{0}, which value of xx makes both x\blockone{x} and sin⁡(x)\blocktwo{\sin(x)} equal 00?

Set the combination equal to 0\built{0} for all xx:
c1x+c2sin⁡(x)+c3cos⁡(x)\displaystyle \blockone{c_1 x} + \blocktwo{c_2 \sin(x)} + \blockthree{c_3 \cos(x)} =0\displaystyle = \built{0}
Plug in x=0x = 0, x=πx = \pi, and x=π2x = \frac{\pi}{2}:
x=0:c1(0)+c2(0)+c3(1)=0  ⟹  c3=0x=π:c1(π)+c2(0)+c3(−1)=0  ⟹  c1π=0  ⟹  c1=0x=π2:c1(π2)+c2(1)+c3(0)=0  ⟹  c2=0\displaystyle \begin{aligned} & x = 0 : \quad \blockone{c_1(0)} + \blocktwo{c_2(0)} + \blockthree{c_3(1)} \\ &\quad = 0 \\ &\quad \implies \blockthree{c_3} = 0 \\ & x = \pi : \quad \blockone{c_1(\pi)} + \blocktwo{c_2(0)} \\ &\quad + \blockthree{c_3(-1)} = 0 \\ &\quad \implies \blockone{c_1\pi} = 0\implies \blockone{c_1} = 0 \\ & x = \tfrac{\pi}{2} : \quad \blockone{c_1\left(\tfrac{\pi}{2}\right)} + \blocktwo{c_2(1)} \\ &\quad + \blockthree{c_3(0)} = 0 \\ &\quad \implies \blocktwo{c_2} = 0 \end{aligned}
(Don't pick x=2πx = 2\pi as your third point after 00 and π\pi: because sin⁡(x)\blocktwo{\sin(x)} is 00 at all three multiples of π\pi, the c2\blocktwo{c_2} term would drop out of every equation and c2\blocktwo{c_2} would never get tested.)
Because c1=c2=c3=0\blockone{c_1} = \blocktwo{c_2} = \blockthree{c_3} = 0 is the only solution, the three functions are linearly independent.
6

A student claims that the functions 1\blockone{1} and x\blocktwo{x} are linearly dependent because 1(1)+(−1)(x)=0\blockone{1(1)} + \blocktwo{(-1)(x)} = 0 at x=1x = 1. Explain why this reasoning fails, and then determine whether the functions 3\blockone{3}, 2sin⁡2(x)\blocktwo{2\sin^2(x)}, and 2cos⁡2(x)\blockthree{2\cos^2(x)} are linearly independent or linearly dependent.

Does 1−x=0\blockone{1} - \blocktwo{x} = 0 still hold at x=0x = 0? For the second part, how can you choose weights on 3\blockone{3}, 2sin⁡2(x)\blocktwo{2\sin^2(x)}, and 2cos⁡2(x)\blockthree{2\cos^2(x)} so the coefficients match 6sin⁡2(x)+6cos⁡2(x)=6\blocktwo{6\sin^2(x)} + \blockthree{6\cos^2(x)} = \blockone{6}?

The student's reasoning fails because the zero vector in function space must equal 00 at every xx slot at once, not just at x=1x = 1; plugging both x=0x = 0 and x=1x = 1 into c1(1)+c2x=0\blockone{c_1(1)} + \blocktwo{c_2 x} = \built{0} forces c1=0\blockone{c_1} = 0 and c2=0\blocktwo{c_2} = 0, so 1\blockone{1} and x\blocktwo{x} are linearly independent.
For 3\blockone{3}, 2sin⁡2(x)\blocktwo{2\sin^2(x)}, and 2cos⁡2(x)\blockthree{2\cos^2(x)}, the identity sin⁡2(x)+cos⁡2(x)=1\blocktwo{\sin^2(x)} + \blockthree{\cos^2(x)} = \blockone{1} holds for every xx.
(Be careful not to reuse the weights c1=−1,c2=1,c3=1\blockone{c_1} = \fails{-1}, \blocktwo{c_2} = \fails{1}, \blockthree{c_3} = \fails{1}, which gives −3+2sin⁡2(x)+2cos⁡2(x)=−1≠0\blockone{-3} + \blocktwo{2\sin^2(x)} + \blockthree{2\cos^2(x)} = \fails{-1 \neq 0} and makes the functions look independent.)
Choosing weights c1=−2\blockone{c_1} = -2, c2=3\blocktwo{c_2} = 3, and c3=3\blockthree{c_3} = 3 makes the terms cancel across all xx:
(−2)(3)+3(2sin⁡2(x))+3(2cos⁡2(x))=−6+6(sin⁡2(x)+cos⁡2(x))=0for all x\displaystyle \begin{aligned} & \blockone{(-2)(3)} + \blocktwo{3(2\sin^2(x))} \\ &\quad + \blockthree{3(2\cos^2(x))} = \blockone{-6} \\ &\quad + 6(\blocktwo{\sin^2(x)} + \blockthree{\cos^2(x)}) \\ &\quad = \built{0} \quad \text{for all } x \end{aligned}
Because nonzero weights produce the zero function across the entire axis, 3\blockone{3}, 2sin⁡2(x)\blocktwo{2\sin^2(x)}, and 2cos⁡2(x)\blockthree{2\cos^2(x)} are linearly dependent.
7

Find a basis and the dimension of the subspace of polynomials of degree up to 2 that satisfy both p(0)=0p(0) = 0 and p(1)=0p(1) = 0.

Write p(x)=a+bx+cx2p(x) = \blockone{a} + \blocktwo{bx} + \blockthree{cx^2}: which coordinate does p(0)=0p(0) = 0 eliminate right away?

Writing p(x)=a+bx+cx2p(x) = \blockone{a} + \blocktwo{bx} + \blockthree{cx^2}, the two point conditions give:
p(0)=0  ⟹  a=0p(1)=0  ⟹  a+b+c=0  ⟹  b=−c\displaystyle \begin{aligned} p(0) = 0 &\implies \blockone{a} = 0 \\ p(1) = 0 &\implies \blockone{a} + \blocktwo{b} + \blockthree{c} = 0 \\ &\implies \blocktwo{b} = \blockthree{-c} \end{aligned}
(Don't leave b\blocktwo{b} and c\blockthree{c} as two independent variables after using a=0\blockone{a} = 0, which would give the 22-dimensional basis {x,x2}\fails{\{x, x^2\}} that doesn't satisfy p(1)=0p(1) = 0.)
Substituting a=0\blockone{a} = 0 and b=−c\blocktwo{b} = \blockthree{-c} into the coordinate vector leaves a single free variable c\blockthree{c}:
[abc]=[0−cc]=c[0−11]\displaystyle \begin{bmatrix} \blockone{a} \\ \blocktwo{b} \\ \blockthree{c} \end{bmatrix} = \begin{bmatrix} 0 \\ \blockthree{-c} \\ \blockthree{c} \end{bmatrix} = \blockthree{c\begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix}}
Translating [0−11]\blockthree{\begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix}} back into {1,x,x2}\{\blockone{1}, \blocktwo{x}, \blockthree{x^2}\} gives −x+x2\blockthree{-x + x^2}, so a basis is {x2−x}\{\blockthree{x^2 - x}\} and the dimension is 11.