A polynomial like 3+2x+5x2 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
Because the powers 1,x, and x2 never mix when we add or scale polynomials, they act as slot labels that keep the coefficients separated, just like ^,^, and k^ in three dimensions:
Because the standard basis {1,x,x2} includes the constant function 1 along with x and x2, the space of polynomials of degree up to 2 has dimension 3, not 2.
Try dragging the three basis curves to see how the flat line c1(1), the slanted line c2x, and the basic parabola c3x2 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,1−x+x2, and 3+x+x2 are linearly independent and form a basis for the space of polynomials of degree up to 2, without trying to guess from their graphs.
Testing Polynomial Independence with Coordinates
1+x
1−x+x2
3+x+x2
x
independent?
span?
basis?
Text solution
Write each polynomial as a coordinate vector in {1,x,x2}Read off the coefficients of 1,x, and x2 in order, placing a 0 in any missing power's slot:
1+x1−x+x23+x+x2↔110,↔1−11,↔311
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:
2110+11−11=311
So 2(1+x)+(1−x+x2)=3+x+x2, which means the third polynomial is built from the first two: the three polynomials are linearly dependent and only span 2 directions, so they do not form a basis for the 3-dimensional space.
3
Change of Basis with Shifted Polynomials
The standard basis {1,x,x2} centers a polynomial around x=0, but to see how 3+2x+5x2 behaves near x=1, we want to rewrite that same polynomial in the shifted basis {1,x−1,(x−1)2}.
Change of Basis with Shifted Polynomials
3+2x+5x2c1,c2,c3=c1(1)+c2(x−1)+c3(x−1)2=?
Text solution
Write the shifted basis functions in {1,x,x2} coordinatesExpand each shifted basis polynomial so its standard coordinate vector becomes a column of the change-of-basis matrix:
Solve from the bottom row upBecause 1 has no x term and only (x−1)2 contains an x2 term, the matrix is upper triangular and gives one coordinate at a time from bottom to top:
c3c2−2(5)=2⟹c2c1−12+5=3⟹c1=5=12=10
So the shifted coordinate vector is 10125, which rewrites 3+2x+5x2 as 10+12(x−1)+5(x−1)2.
You can check the first shifted coordinate in your head by plugging x=1 into both sides: every (x−1) term becomes 0 on the right, leaving c1=10 to match 3+2(1)+5(1)2=10.
Slide the center point x=a to see the shifted basis curves 1,x−a, and (x−a)2 move along the axis and the coordinates c1c2c3 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 2 that pass through a required height at x=1. We want to know when a point rule like p(1)=4 or p(1)=0 defines a subspace, and how to find its basis and dimension.
Subspaces of Polynomials
A: p(1)=0
B: p(1)=4
1
4
1
subspace?
subspace?
Text solution
Test closure under addition and scaling at x=1Adding two polynomials with p(1)=4 and q(1)=4 doubles their height at x=1 to 4+4=8=4 (failing closure), whereas height 0 stays at 0 when added or scaled:
p(1)+q(1)k⋅p(1)=0+0=0,=k⋅0=0
Turn the point rule p(1)=0 into a coordinate equationWrite p(x)=a+bx+cx2 and plug in x=1 so the condition on the curve becomes an equation that fixes a in terms of the free coordinates b and c:
a+b(1)+c(1)2⟹a=0=−b−c
Substitute into the coordinate vector and split by the free variablesReplace a inside abc and separate the column by b and c to find the basis vectors:
abc=−b−cbc=b−110+c−101
Translating those two columns back using {1,x,x2} gives the basis {x−1,x2−1} (or {x−1,(x−1)2} by dropping 1 from the shifted basis), and pinning one point on the graph drops the dimension from 3 down to 2.
Move the pin at x=1 up and down to see why the sum of two pinned curves only stays on the pin when the pin sits at height 0.
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) and ex aren't built from a finite list of powers like 1,x, and x2, so to treat general functions as vectors we need a direct way to see any curve f(x) as a column of numbers.
General Functions as Infinite-Slot Vectors
0
1
f(x)
x
1xx2???
Instead of one slot per power of x, a general function has one slot for every location x along the axis, storing the graph's height f(x) in slot x just like an array stores v[i] at index i:
f(x)+g(x)⟷add heights f(x) and g(x) at every slot x
Pull the curve up and down between x=0 and x=1 to see how the height at each location x 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,sin(x), and cos(x) have infinitely many x slots instead of a 3-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)
x=1
x
the zero function
0
0
0
0
0
0
x
Testing Linear Independence of Functions
c1(1)+c2sinx+c3cosx=0
independent?
1
sinx
cosx
Text solution
Set a combination equal to the zero function across all xRequire the weighted combination of 1,sin(x), and cos(x) to equal 0 in every single x slot at the same time:
c1(1)+c2sin(x)+c3cos(x)=0 at every x0
Plug in three convenient x valuesBecause the equation must hold at every x, plug in three angles where sin(x) and cos(x) are simply 0,1, or −1:
x=0x=2πx=π:c1+c3=0:c1+c2=0:c1−c3=0
Solve the resulting system for the weightsAdd the first and third equations to find c1, then substitute back to find c3 and c2:
2c1c3=0⟹c1=0,=0,c2=0
Because c1=c2=c3=0 is the only solution that works even at those three locations, the functions 1,sin(x), and cos(x) are linearly independent.
For 1,sin2(x), and cos2(x), however, the trig identity sin2(x)+cos2(x)=1 holds at every x, which gives nonzero weights that cancel across the entire axis:
(−1)(1)+1sin2(x)+1cos2(x)=0for all x
So cos2(x)=1−sin2(x) is built out of the first two functions, making 1,sin2(x), and cos2(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
dxd
1
x
x2
?
?
?
Key concepts
For polynomials of degree up to n, translate each polynomial directly into its (n+1)-slot coordinate vector in {1,x,x2,…,xn}, remembering the constant 1 slot and putting 0 in the slot of any missing power, so p(x)=4−3x2 becomes 40−3 in a 3-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}, 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)=0 defines a subspace (find its basis by turning p(a)=0 into one equation on the coefficients of p and splitting the column by its free variables), whereas p(a)=k with k=0 fails closure because adding two curves gives height 2k.
When functions like sin(x) and cos(x) aren't polynomials, view f(x) as an infinite-slot vector storing the height f(x) at each slot x. In this space, the zero vector is the flat line equal to 0 at every x at once, so never claim two functions like 1 and x are dependent just because 1−x=0 at a single point x=1. To prove functions are linearly independent, set c1f(x)+c2g(x)+c3h(x)=0 and plug in a few convenient x values that force c1=c2=c3=0; but before plugging in numbers, check whether an identity like sin2(x)+cos2(x)=1 already links the functions across all x, 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}, write the coordinate vectors of p(x)=4−3x2 and q(x)=1+2x+x2, find the coordinate vector and polynomial for 2p(x)−q(x), and state the dimension of this space.
In p(x)=4−3x2, what is the coefficient of the middle basis function x?
Matching the slots to {1,x,x2} in order gives:
p(x)q(x)=4+0x−3x2↔40−3,=1+2x+1x2↔121
(Watch out for skipping the missing x term in 4−3x2 and writing 4−30, which shifts −3 into the x slot and gives the wrong combination 7−8x−x2.)
Because the basis {1,x,x2} has 3 basis functions (don't forget the constant function 1 and answer 2 from the highest power x2), the dimension of the space is 3.
2
Determine whether the three polynomials 1+2x,2+x+x2, and 5+4x+2x2 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}: how many of 211 do you need to match the bottom (x2) slot of 542?
In the standard basis {1,x,x2}, the three coordinate vectors are:
120,211,542
(Don't stop after checking that no column is a multiple of another and assume 3 polynomials in a 3-dimensional space must form a basis. Check whether the first two columns combine to make the third.)
Matching the bottom slot takes 2 of the second column, and adding 1 of the first column gives:
1120+2211=542
Because (1+2x)+2(2+x+x2)=5+4x+2x2, the polynomials are linearly dependent, do not span the 3-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} to the standard basis {1,x,x2}, and use it to rewrite 5−6x+2x2 in the shifted basis.
Expand (x−2)2 into {1,x,x2} to form the third column, then solve the system from the bottom row (x2 slot) up.
Expanding each shifted basis function into {1,x,x2} coordinates gives:
(Be careful not to expand (x−2)2 as 4+x2 without the −4x middle term, which leaves a 0 in the second row and gives c2=−6,c1=−15.)
Putting these into columns gives the change-of-basis matrix, and we solve for the shifted coordinates c1c2c3 that produce 5−62:
100−2104−41c1c2c3=5−62
(Don't multiply the matrix directly by 5−62, which converts in the wrong direction and gives 25−142.)
Solving from the bottom row up:
c3c2−4(2)=−6⟹c2c1−2(2)+4(2)=5⟹c1=2=2=1
The shifted coordinate vector is 122, which is 1+2(x−2)+2(x−2)2.
4
In the space of polynomials of degree up to 2, explain whether the rule p(2)=3 defines a subspace, then show that the rule p(2)=0 defines a subspace and find a basis and the dimension for it.
For p(2)=0, plug x=2 into p(x)=a+bx+cx2: what does a equal in terms of b and c?
The rule p(2)=3 does not define a subspace because the zero polynomial has height 0=3 at x=2, and adding two polynomials with p(2)=3 and q(2)=3 gives p(2)+q(2)=6=3.
The rule p(2)=0 defines a subspace because the zero polynomial has height 0=0, addition preserves height 0+0=0, and scaling preserves height k⋅0=0. Writing p(x)=a+bx+cx2 and plugging in x=2 gives:
a+2b+4c⟹a=0=−2b−4c
(Watch out for forgetting to square 2 on the cx2 term and writing a+2b+2c=0, which gives the wrong second basis polynomial x2−2.)
Substituting a=−2b−4c into the coordinate vector and splitting by b and c:
abc=−2b−4cbc=b−210+c−401
Translating back into {1,x,x2} gives a basis of {x−2,x2−4} (or {x−2,(x−2)2}), and the dimension is 2.
5
Test whether the functions x,sin(x), and cos(x) are linearly independent by setting a combination equal to the zero function and plugging in three convenient values of x.
In c1x+c2sin(x)+c3cos(x)=0, which value of x makes both x and sin(x) equal 0?
(Don't pick x=2π as your third point after 0 and π: because sin(x) is 0 at all three multiples of π, the c2 term would drop out of every equation and c2 would never get tested.)
Because c1=c2=c3=0 is the only solution, the three functions are linearly independent.
6
A student claims that the functions 1 and x are linearly dependent because 1(1)+(−1)(x)=0 at x=1. Explain why this reasoning fails, and then determine whether the functions 3,2sin2(x), and 2cos2(x) are linearly independent or linearly dependent.
Does 1−x=0 still hold at x=0? For the second part, how can you choose weights on 3,2sin2(x), and 2cos2(x) so the coefficients match 6sin2(x)+6cos2(x)=6?
The student's reasoning fails because the zero vector in function space must equal 0 at every x slot at once, not just at x=1; plugging both x=0 and x=1 into c1(1)+c2x=0 forces c1=0 and c2=0, so 1 and x are linearly independent.
For 3,2sin2(x), and 2cos2(x), the identity sin2(x)+cos2(x)=1 holds for every x.
(Be careful not to reuse the weights c1=−1,c2=1,c3=1, which gives −3+2sin2(x)+2cos2(x)=−1=0 and makes the functions look independent.)
Choosing weights c1=−2,c2=3, and c3=3 makes the terms cancel across all x:
(−2)(3)+3(2sin2(x))+3(2cos2(x))=−6+6(sin2(x)+cos2(x))=0for all x
Because nonzero weights produce the zero function across the entire axis, 3,2sin2(x), and 2cos2(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)=0 and p(1)=0.
Don't leave b and c as two independent variables after using a=0, which would give the 2-dimensional basis {x,x2} that doesn't satisfy p(1)=0.
Write p(x)=a+bx+cx2: which coordinate does p(0)=0 eliminate right away?
Writing p(x)=a+bx+cx2, the two point conditions give:
p(0)=0p(1)=0⟹a=0⟹a+b+c=0⟹b=−c
(Don't leave b and c as two independent variables after using a=0, which would give the 2-dimensional basis {x,x2} that doesn't satisfy p(1)=0.)
Substituting a=0 and b=−c into the coordinate vector leaves a single free variable c:
abc=0−cc=c0−11
Translating 0−11 back into {1,x,x2} gives −x+x2, so a basis is {x2−x} and the dimension is 1.