You learn to test whether a set is a basis, to find a basis and the dimension of a subspace given by equations, to extract a basis from a set, and to compute the coordinates of a vector relative to a basis.
basisstandard basisdimensionfinite-dimensionalcoordinate vectorcoordinates relative to a basispivot columnssolution spaceunique representation
Last week we asked two questions: “Do these vectors span the space?” and “Is there an unnecessary vector?”. A set for which the answer is “yes, it spans, no, nothing is unnecessary” is called a basis. A basis is a coordinate system for a space: every vector is written in exactly one way with the elements of the basis. The number of elements in a basis is the dimension of the space. These two concepts are the groundwork for rank (week 9) and the matrices of linear transformations (week 12).
Golden rules:
Basis = independent + spans.
If you know the dimension, half the work is done: in an n-dimensional space, n independent vectors automatically span.
The basis of a subspace given by an equation: solve the equations, separate by the free variables.
When choosing a basis from a set, take the original vectors corresponding to the pivot columns.
Basis
Let V be a vector space and B={v1,…,vn}⊆V. If B is both
linearly independent, and
spans V,
then it is a basis of V.
Why it matters: unique representation. If B is a basis, then for every v∈V the expression v=c1v1+⋯+cnvn is unique. If there were two different expressions, their difference would be a nontrivial combination of zero and independence would fail.
Standard bases
Space
Standard basis
Dimension
Rn
e1=(1,0,…,0),…,en
n
Pn
{1,x,x2,…,xn}
n+1
M2,2
[1000],[0010],[0100],[0001]
4
Mm,n
matrices with a single 1 and 0 elsewhere
mn
{0}
the empty set
0
A space has infinitely many bases. The standard basis is just the easiest one.
Dimension
Theorem. If one basis of V has n elements, every basis of V has n elements. This common number is called the dimension of V: dimV=n.
The idea behind it: in a space spanned by n vectors, more than n vectors are always dependent. The consequences (dimV=n):
The set you have
Result
more than n vectors
dependent, not a basis
fewer than n vectors
does not span V, not a basis
exactly n vectors, independent
basis (no need to check spanning)
exactly n vectors, spanning V
basis (no need to check independence)
For n vectors in Rn the only test is the determinant of the column matrix.
Example 1. Is B={(1,2,0),(0,1,1),(1,0,2)} a basis for R3?
det120011102=1(2−0)−0+1(2−0)=4=0.
Yes, it is a basis.
Coordinate vector
If B={v1,…,vn} is a basis and v=c1v1+⋯+cnvn, the coordinate vector of v relative to B is
[v]B=(c1,…,cn).
The order matters: a basis is an ordered set. To find it, solve the system. For B from Example 1 and v=(3,5,3):
In the standard basis, the coordinates are the components themselves: in P2 the coordinate of 4−x+3x2 relative to {1,x,x2} is (4,−1,3). In week 12 we will see the change of coordinates between two bases (transition matrix).
Finding a basis of a subspace
A subspace given by equations.W={(x,y,z,w):x+y−2z+w=0}, in R4.
x = -y + 2z - w; y = r, z = s, w = t free(x,y,z,w) = r(-1,1,0,0) + s(2,0,1,0) + t(-1,0,0,1)
A basis is {(−1,1,0,0),(2,0,1,0),(−1,0,0,1)}, dimW=3. The vectors obtained this way are automatically independent: each has a 1 in a free position where the others have 0.
General rule: if W={x:Ax=0} then dimW = number of free variables = number of variables − number of pivots.
For matrices and polynomials the same route: write the condition in terms of the coefficients, solve, separate by the free coefficients (Q6, Q7).
PITFALL · confusing the dimension with the number of equations.dimW=n−(number of equations) is true only if the equations are independent. In Q12 there are 3 equations but one is the sum of the other two; the dimension is 4−2=2, not 4−3=1. Always reduce to REF and count the pivots.
Extracting a basis from a set
A set S={v1,…,vk} is given; a basis for spanS made of elements of S is asked.
Make the vectors columns.
Reduce to REF and identify the pivot columns.
The original vectors corresponding to the pivot columns form the basis; their number is dimspanS.
The pivots are in columns 1 and 3: the basis is {(1,2,−1),(0,1,3)}, dimension 2. The non-pivot columns also tell you the combination: column 2 = 2 × column 1, column 4 = column 1 + column 3. Indeed (1,3,2)=(1,2,−1)+(0,1,3).
PITFALL · writing the columns of the REF as the basis. Row operations change the column space. The columns of the REF only tell you which vectors to choose; write the original vectors in the answer.
Completing a basis and the dimension of a subspace
An independent set can always be extended to a basis: add a vector not in the span, independence is preserved, continue.
A spanning set can always be reduced to a basis: discard one that is a combination of the others.
If W⊆V is a subspace then dimW≤dimV; if they are equal, W=V.
Dimensions of the subspaces of R3: {0} is 0, a line is 1, a plane is 2, R3 is 3.
Common mistakes
Wrong
Right
dimPn=n
n+1
Checking only spanning for a basis
Independence is also required (if the dimension is not known)
Writing a proof of both spanning and independence for n vectors in an n-dimensional space
One is enough
Writing the columns of the REF as the basis
The original vectors
Getting the dimension by subtracting the number of equations
Count pivots: there may be dependent equations
Mixing up the order of the basis in the coordinate vector
[v]B in the order the basis is given
Writing the basis of {0} as {0}
The empty set; a set containing 0 is dependent
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Question 1easy
What are dimM2,3 and dimP3?
Show answer
6 and 4
M2,3: the 6 matrices with a 1 in one position and 0 elsewhere form the standard basis. dim=2⋅3=6.P3: the standard basis {1,x,x2,x3} has 4 elements. Trap: the degree is 3 but the dimension is 3+1=4.
Question 2easy
Is {(1,2),(2,4)} a basis for R2?
Show answer
No
(2,4)=2(1,2): dependent. det[1224]=0. Both vectors lie on a single line, they do not span R2.
Question 3medium
Is {(1,0,1),(2,1,0),(1,1,2)} a basis for R3?
Show answer
Yes
3 vectors, dimR3=3: independence (or spanning) alone is enough. The column matrix is 101210112, along column 1: 1(2−0)−0+1(2−1)=3=0.
Question 4medium
Find a basis and the dimension of W={(x,y,z):x−3y+2z=0}.
Show answer
Basis {(3,1,0),(−2,0,1)}, dimW=2
x=3y−2z, with y=s, z=t free: (3s−2t,s,t)=s(3,1,0)+t(−2,0,1). The two vectors span and are independent (look at the 2nd and 3rd components). One equation, 3 variables: dim=3−1=2.
Question 5medium
Find a basis and the dimension of W={(a,b,c,d):a+b=0,c−2d=0} in R4.
Show answer
Basis {(−1,1,0,0),(0,0,2,1)}, dimW=2
a=−b, c=2d. With b=s, d=t: (−s,s,2t,t)=s(−1,1,0,0)+t(0,0,2,1). Two independent equations, 4 variables: dim=4−2=2.
Question 6medium
What is the dimension of the subspace of 3×3 symmetric matrices?
Show answer
6
A symmetric matrix is completely determined by the diagonal (3 entries) and the above-diagonal part (3 entries); the lower part is a mirror. One basis matrix for each free position: 3+3=6. In general: 2n(n+1).
Question 7medium
Find a basis and the dimension of W={p∈P2:p(1)=0}.
Show answer
Basis {x−1,x2−1}, dimW=2
p=a+bx+cx2, p(1)=a+b+c=0⇒a=−b−c.p=−b−c+bx+cx2=b(x−1)+c(x2−1). The two polynomials are independent (different degrees).dimP2=3, one condition: 3−1=2.
Question 8medium
Find the coordinate vector of v=(5,3) relative to the basis B={(1,1),(1,−1)}.
Find a basis for spanS consisting of vectors from S={(1,2,1),(2,4,2),(1,0,1),(0,1,0)}, and give its dimension.
Show answer
Basis {(1,2,1),(1,0,1)}, dimension 2
Make the vectors columns and reduce: 121242101010. R2←R2−2R1: (0,0,−2,1); R3←R3−R1: a zero row. The pivots are in columns 1 and 3. The original 1st and 3rd vectors form the basis. Check: (2,4,2)=2(1,2,1), (0,1,0)=21[(1,2,1)−(1,0,1)].
Question 10hard
For which values of k is {(1,k,2),(0,1,k),(1,0,1)} a basis for R3?
Show answer
k=1 and k=−1
The determinant of the matrix with these as rows, along row 1: 1(1−0)−k(0−k)+2(0−1)=1+k2−2=k2−1. Basis ⟺det=0⟺k=±1.
Question 11easy
True or false: A set of three polynomials can span P3.
Show answer
False
dimP3=4. To span a space of dimension n you need at least n vectors. The span of three polynomials is at most 3-dimensional.
Question 12hard
Find a basis for and the dimension of the solution space of x1+2x2−x3+x4=0, 2x1+4x2−x3+3x4=0, 3x1+6x2−2x3+4x4=0.
Show answer
Basis {(−2,1,0,0),(−2,0,−1,1)}, dimension 2
R2←R2−2R1: (0,0,1,1). R3←R3−3R1: (0,0,1,1). R3←R3−R2: zero. R1←R1+R2: (1,2,0,2). RREF: x1=−2x2−2x4, x3=−x4. With x2=s, x4=t: s(−2,1,0,0)+t(−2,0,−1,1). Dimension = number of free variables = 4−2=2.
Verification: The basis tests were done in node with BigInt fractions using determinants and rank, the subspace bases as null spaces from the exact RREF, and the coordinate vectors by exact solution; the pivot columns were read from the RREF, and in the parametric basis question det = k² − 1 was checked at many values of k (verify/MAT1041/08.mjs).
Review card
BASIS: both linearly independent and spans V.
Every v is a UNIQUE combination of the basis vectors → coordinates.
All bases have the same number of elements → dim V.
dim Rⁿ = n, dim P_n = n+1, dim M_mn = mn, dim {0} = 0.
dim symmetric n×n = n(n+1)/2.
When dim V = n: n independent vectors → basis; n vectors that span → basis (one is enough).
more than n → dependent; fewer than n → do not span.
n vectors in Rⁿ are a basis ⇔ det ≠ 0.
Basis of a subspace (given by equations): solve, give the free variables s,t, separate the vectors.
dim = number of variables - number of independent equations = number of free variables.
Extract a basis from a set: make columns, REF, the ORIGINAL vectors of the PIVOT columns.
[v]_B: solve the system c1b1 + ... + cnbn = v.
W ⊆ V → dim W ≤ dim V; if equal, W = V.