evan's notes
cal 3discreteodeenv systems

On this page

  • 1. The Big Idea
  • 2. Linear Combinations
  • 3. Span
  • Standard Basis of R3\mathbb R^3R3
  • 4. Spanning Polynomial Spaces
  • 5. Spanning Matrix Spaces
  • 6. How to Check Linear Combinations and Span
  • Checking Whether Vectors Span Rn\mathbb R^nRn
  • 7. Linear Independence
  • Meaning
  • 8. Fast Independence Test with Determinants
  • 9. Basis
  • Basis of R3\mathbb R^3R3
  • 10. Coordinates Relative to a Basis
  • 11. Basis for Subspaces
  • Example: Trace-Zero 2×22\times 22×2 Matrices
  • 12. Problem-Solving Routine
  • 13. Key Takeaways
  • Mini-Self-Check

Linear Algebra

§5 Vector Spaces

Evan Luo · Feb 24, 2026

Linear Algebra

§5 Vector Spaces

Evan LuoFeb 24, 2026

9 min read

1. The Big Idea

Vector spaces are about building objects using addition and scalar multiplication.

The objects might be ordinary vectors, polynomials, matrices, or something more abstract. The same questions keep coming back:

  1. Can these objects build the whole space?
  2. Is any object redundant?
  3. Do we have the perfect set of building blocks?

Here is the vocabulary in plain language:

IdeaPlain meaning
linear combinationa recipe made by scaling and adding vectors
spaneverything those recipes can build
linear independenceno redundancy
basisspans the space and has no redundancy
coordinatesinstructions for building a vector from a chosen basis
dimensionnumber of vectors in a basis

The main theme is simple: a basis is the cleanest possible way to describe a space.


2. Linear Combinations

A vector w⃗\vec{w}w is a linear combination of vectors v⃗1,v⃗2,…,v⃗r\vec{v}_1,\vec{v}_2,\dots,\vec{v}_rv1​,v2​,…,vr​ if

w⃗=a1v⃗1+a2v⃗2+⋯+arv⃗r\vec{w}=a_1\vec{v}_1+a_2\vec{v}_2+\cdots+a_r\vec{v}_r w=a1​v1​+a2​v2​+⋯+ar​vr​

where a1,a2,…,ara_1,a_2,\dots,a_ra1​,a2​,…,ar​ are scalars.

The scalars are called coefficients.

Think of a linear combination as a recipe:

  • the vectors are the ingredients
  • the coefficients say how much of each ingredient to use
  • the final result is the vector you build

For example, if

v⃗1=(1,0),v⃗2=(0,1)\vec{v}_1=(1,0),\qquad \vec{v}_2=(0,1) v1​=(1,0),v2​=(0,1)

then

3v⃗1+5v⃗2=(3,5)3\vec{v}_1+5\vec{v}_2=(3,5) 3v1​+5v2​=(3,5)

So (3,5)(3,5)(3,5) is a linear combination of v⃗1\vec{v}_1v1​ and v⃗2\vec{v}_2v2​.


3. Span

The span of a set of vectors is the set of all possible linear combinations of those vectors.

span⁡{v⃗1,v⃗2,…,v⃗r}\operatorname{span}\{\vec{v}_1,\vec{v}_2,\dots,\vec{v}_r\} span{v1​,v2​,…,vr​}

means all vectors you can build using v⃗1,v⃗2,…,v⃗r\vec{v}_1,\vec{v}_2,\dots,\vec{v}_rv1​,v2​,…,vr​.

If a set spans a space, then the vectors in the set can build every vector in that space.

Standard Basis of R3\mathbb R^3R3

Let

e1=(1,0,0),e2=(0,1,0),e3=(0,0,1)e_1=(1,0,0),\qquad e_2=(0,1,0),\qquad e_3=(0,0,1) e1​=(1,0,0),e2​=(0,1,0),e3​=(0,0,1)

These vectors span R3\mathbb R^3R3, because every vector

(x,y,z)(x,y,z) (x,y,z)

can be written as

(x,y,z)=x(1,0,0)+y(0,1,0)+z(0,0,1)(x,y,z)=x(1,0,0)+y(0,1,0)+z(0,0,1) (x,y,z)=x(1,0,0)+y(0,1,0)+z(0,0,1)

So e1,e2,e3e_1,e_2,e_3e1​,e2​,e3​ can build every vector in R3\mathbb R^3R3.


4. Spanning Polynomial Spaces

Vector spaces do not have to contain arrows. They can contain polynomials too.

For P2P_2P2​, the space of polynomials of degree at most 2, every polynomial looks like

a+bx+cx2a+bx+cx^2 a+bx+cx2

The standard spanning set is

{1,x,x2}\{1,x,x^2\} {1,x,x2}

because

a+bx+cx2=a(1)+b(x)+c(x2)a+bx+cx^2=a(1)+b(x)+c(x^2) a+bx+cx2=a(1)+b(x)+c(x2)

This is the same idea as vectors in R3\mathbb R^3R3. The objects look different, but we are still building everything from a few basic pieces.


5. Spanning Matrix Spaces

Matrices can also form vector spaces.

For M2×2M_{2\times 2}M2×2​, the space of all 2×22\times 22×2 matrices, every matrix looks like

[abcd]\begin{bmatrix} a&b\\ c&d \end{bmatrix} [ac​bd​]

The standard spanning set is

{[1000],[0100],[0010],[0001]}\left\{ \begin{bmatrix} 1&0\\ 0&0 \end{bmatrix}, \begin{bmatrix} 0&1\\ 0&0 \end{bmatrix}, \begin{bmatrix} 0&0\\ 1&0 \end{bmatrix}, \begin{bmatrix} 0&0\\ 0&1 \end{bmatrix} \right\} {[10​00​],[00​10​],[01​00​],[00​01​]}

Each matrix turns on one entry and leaves the others zero.

Any matrix in M2×2M_{2\times 2}M2×2​ can be built as

[abcd]=a[1000]+b[0100]+c[0010]+d[0001]\begin{bmatrix} a&b\\ c&d \end{bmatrix} = a\begin{bmatrix} 1&0\\ 0&0 \end{bmatrix} + b\begin{bmatrix} 0&1\\ 0&0 \end{bmatrix} + c\begin{bmatrix} 0&0\\ 1&0 \end{bmatrix} + d\begin{bmatrix} 0&0\\ 0&1 \end{bmatrix} [ac​bd​]=a[10​00​]+b[00​10​]+c[01​00​]+d[00​01​]

So those four matrices span M2×2M_{2\times 2}M2×2​.


6. How to Check Linear Combinations and Span

To check whether a vector is in a span, turn the question into a system of equations.

Suppose you want to know whether w⃗\vec{w}w is a linear combination of v⃗1,v⃗2,v⃗3\vec{v}_1,\vec{v}_2,\vec{v}_3v1​,v2​,v3​.

Set up

w⃗=av⃗1+bv⃗2+cv⃗3\vec{w}=a\vec{v}_1+b\vec{v}_2+c\vec{v}_3 w=av1​+bv2​+cv3​

Then solve for a,b,ca,b,ca,b,c.

Result of the systemMeaning
has a solutionw⃗\vec{w}w is in the span
has no solutionw⃗\vec{w}w is not in the span

Checking Whether Vectors Span Rn\mathbb R^nRn

If you have nnn vectors in Rn\mathbb R^nRn, place them as columns in a matrix:

A=[∣∣∣v⃗1v⃗2v⃗3∣∣∣]A= \begin{bmatrix} |&|&|\\ \vec{v}_1&\vec{v}_2&\vec{v}_3\\ |&|&| \end{bmatrix} A=​∣v1​∣​∣v2​∣​∣v3​∣​​

For three vectors in R3\mathbb R^3R3:

det⁡(A)≠0\det(A)\neq 0 det(A)=0

means the vectors span R3\mathbb R^3R3.

If

det⁡(A)=0\det(A)=0 det(A)=0

then they do not span all of R3\mathbb R^3R3.

This determinant shortcut works when the number of vectors matches the dimension, so the matrix is square.


7. Linear Independence

A set of vectors is linearly independent if no vector in the set is redundant.

The formal test is:

a1v⃗1+a2v⃗2+⋯+arv⃗r=0⃗a_1\vec{v}_1+a_2\vec{v}_2+\cdots+a_r\vec{v}_r=\vec{0} a1​v1​+a2​v2​+⋯+ar​vr​=0

If the only solution is

a1=a2=⋯=ar=0a_1=a_2=\cdots=a_r=0 a1​=a2​=⋯=ar​=0

then the vectors are linearly independent.

This is called the trivial solution.

If there is a solution where at least one coefficient is not zero, then the vectors are linearly dependent.

Meaning

SituationMeaning
independentno vector can be built from the others
dependentat least one vector is unnecessary because it can be built from the others

So linear independence is really a no-redundancy test.


8. Fast Independence Test with Determinants

For nnn vectors in Rn\mathbb R^nRn, place the vectors as columns in a square matrix AAA.

If

det⁡(A)≠0\det(A)\neq 0 det(A)=0

then the vectors are linearly independent.

If

det⁡(A)=0\det(A)=0 det(A)=0

then the vectors are linearly dependent.

This is one of the fastest exam methods, but remember the condition: it works directly when you have exactly nnn vectors in Rn\mathbb R^nRn.

For example, three vectors in R3\mathbb R^3R3 form a 3×33\times 33×3 matrix, so the determinant test applies.


9. Basis

A basis is a set of vectors that does two things:

  1. It spans the space.
  2. It is linearly independent.

So a basis is the perfect set of building blocks.

It has enough vectors to build the whole space, but no extra unnecessary vectors.

PropertyWhy it matters
spanscan build every object in the space
independenthas no redundant builders

Basis of R3\mathbb R^3R3

The standard basis is

{(1,0,0),(0,1,0),(0,0,1)}\{(1,0,0),(0,1,0),(0,0,1)\} {(1,0,0),(0,1,0),(0,0,1)}

Every vector in R3\mathbb R^3R3 can be built from these vectors, and none of them is redundant.


10. Coordinates Relative to a Basis

Coordinates depend on the basis you choose.

If

S={v⃗1,v⃗2,…,v⃗n}S=\{\vec{v}_1,\vec{v}_2,\dots,\vec{v}_n\} S={v1​,v2​,…,vn​}

is an ordered basis, and

v⃗=c1v⃗1+c2v⃗2+⋯+cnv⃗n\vec{v}=c_1\vec{v}_1+c_2\vec{v}_2+\cdots+c_n\vec{v}_n v=c1​v1​+c2​v2​+⋯+cn​vn​

then the coordinate vector of v⃗\vec{v}v relative to basis SSS is

[v⃗]S=[c1c2⋮cn][\vec{v}]_S= \begin{bmatrix} c_1\\ c_2\\ \vdots\\ c_n \end{bmatrix} [v]S​=​c1​c2​⋮cn​​​

These coordinates are not the vector itself. They are the instructions for building the vector from the basis SSS.

The order of the basis matters. If you swap the order of the basis vectors, the coordinate vector changes too.


11. Basis for Subspaces

A subspace is a smaller vector space sitting inside a larger vector space.

To find a basis for a subspace, look for the free parameters. Each free parameter usually gives one basis vector.

Example: Trace-Zero 2×22\times 22×2 Matrices

Let

M={A∈M2×2:tr⁡(A)=0}M=\left\{ A\in M_{2\times 2}:\operatorname{tr}(A)=0 \right\} M={A∈M2×2​:tr(A)=0}

This means MMM is the set of all 2×22\times 22×2 matrices whose trace is zero.

A general matrix in M2×2M_{2\times 2}M2×2​ looks like

A=[abcd]A= \begin{bmatrix} a&b\\ c&d \end{bmatrix} A=[ac​bd​]

The trace condition is

a+d=0a+d=0 a+d=0

so

d=−ad=-a d=−a

Thus every matrix in this subspace looks like

A=[abc−a]A= \begin{bmatrix} a&b\\ c&-a \end{bmatrix} A=[ac​b−a​]

Now break it apart by parameters:

A=a[100−1]+b[0100]+c[0010]A = a \begin{bmatrix} 1&0\\ 0&-1 \end{bmatrix} + b \begin{bmatrix} 0&1\\ 0&0 \end{bmatrix} + c \begin{bmatrix} 0&0\\ 1&0 \end{bmatrix} A=a[10​0−1​]+b[00​10​]+c[01​00​]

So a basis is

{[100−1],[0100],[0010]}\left\{ \begin{bmatrix} 1&0\\ 0&-1 \end{bmatrix}, \begin{bmatrix} 0&1\\ 0&0 \end{bmatrix}, \begin{bmatrix} 0&0\\ 1&0 \end{bmatrix} \right\} {[10​0−1​],[00​10​],[01​00​]}

There are three free parameters: aaa, bbb, and ccc. That is why the basis has three matrices and the subspace has dimension 3.


12. Problem-Solving Routine

For vector space problems, use this routine:

  1. Identify the space. Are you working in Rn\mathbb R^nRn, a polynomial space, a matrix space, or a subspace?
  2. To test a linear combination, set up coefficients. Write the target as a combination of the given vectors and solve.
  3. To test span, ask whether every object can be built. For nnn vectors in Rn\mathbb R^nRn, use a determinant if possible.
  4. To test independence, set the combination equal to zero. Only the trivial solution means independent.
  5. To find a basis, keep enough vectors to span but remove redundancy. A basis must do both jobs.
  6. For subspaces, look for free parameters. Break the general object into parameter times basic objects.
  7. Dimension equals the number of basis vectors. Count the final basis elements.

13. Key Takeaways

  • A linear combination is a recipe made from scalar multiples and addition.
  • The span is everything those recipes can build.
  • A vector is in a span if the matching coefficient system has a solution.
  • Linear independence means no redundancy.
  • A basis is both spanning and linearly independent.
  • Coordinates relative to a basis are instructions for building a vector from that basis.
  • Dimension is the number of vectors in a basis.
  • For subspaces, free parameters often reveal the basis.

Mini-Self-Check

  1. What does it mean for w⃗\vec{w}w to be in span⁡{v⃗1,v⃗2}\operatorname{span}\{\vec{v}_1,\vec{v}_2\}span{v1​,v2​}?

It means w⃗\vec{w}w can be written as a linear combination of v⃗1\vec{v}_1v1​ and v⃗2\vec{v}_2v2​:

w⃗=av⃗1+bv⃗2\vec{w}=a\vec{v}_1+b\vec{v}_2 w=av1​+bv2​

for some scalars aaa and bbb.

Click to reveal
  1. What is the difference between a spanning set and a basis?

A spanning set can build the whole space, but it might have redundant vectors. A basis spans the space and is linearly independent, so it has no redundancy.

Click to reveal
  1. If three vectors in R3\mathbb R^3R3 are placed as columns of AAA and det⁡(A)=0\det(A)=0det(A)=0, what does that mean?

The vectors are linearly dependent and do not span all of R3\mathbb R^3R3.

Click to reveal
  1. Why does order matter in a basis?

Because coordinates are listed according to the order of the basis vectors. Changing the order changes the meaning of each coordinate entry.

Click to reveal
  1. Why is the trace-zero 2×22\times 22×2 matrix subspace dimension 3?

The trace condition forces d=−ad=-ad=−a, leaving three free parameters: aaa, bbb, and ccc. Therefore the basis has three matrices, so the dimension is 3.

Click to reveal

Source: https://notes.ohevan.com/notes/linear/05-vector-spaces

© 2026 Evan Luo. All rights reserved.

Back to Linear Algebra

0 reads

·Last edited May 23, 2026
  • newsletter

  • about me

  • sponsor

© 2026 Evan Luo. All rights reserved.