Linear Algebra Course Unit
Linear Algebra Course Unit
David L. Duncan
– x, y; or
– hx1 , . . . , xn i , hy1 , . . . , yn i; or
x1 y1
– ... , ...
xn yn
1 Linear Transformations
In mathematics there are two central objects: sets (collections of objects), and
functions (maps taking the objects in one set to the objects in another). When
considering sets with additional structure, it is natural to consider functions
1
that preserve that structure. For example, vector spaces are sets with the extra
structure of vector addition and scalar multiplication. The functions that pre-
serve this structure are called linear transformation, and these are what we will
study in this section. Here is the formal definition:
Definition 1. Let V, W be vector spaces and T : V → W a function. Then T is
called a linear transformation if each of the following conditions are satisfied
for all u, v ∈ V and every k ∈ R:
1. T (u + v) = T (u) + T (v)
2. T (ku) = kT (u)
The next theorem gives two examples of linear transformations that exist
for any vector space.
Theorem 2. Let V be a vector space. Then the following are linear transfor-
mations:
• The zero function T0 : V → {0}. This is the function that sends v to 0
for every v ∈ V .
• The identity function TId : V → V . This is the function that sends v
to v for every v ∈ V .
Proof. We will prove that the identity function is a linear transformation, and
leave the proof of the analogous statement for the zero function as an exercise.
Let u, v ∈ V and k ∈ R. Then TId (u) = u and TId (v) = v, so
Exercise 1. Complete the proof by showing that the zero function T0 is a linear
transformation.
2
When dealing with linear transformation, it is convenient to write the vectors
in Rn as n × 1 matrices:
x1
..
.
xn
Note that this means we will be writing elements of R1 as [x].
T : R1 −→ R1
Example 1. Define
T2 : R1 −→ R1
by
T2 ([x]) := 2 [x] .
Then T2 is a linear transformation because of the distributive property:
= 2 [x] + 2 [y]
= T2 ([x]) + T2 ([y]) ,
and because of the commutative property of multiplication in R:
= k(2 [x])
= kT2 ([x]).
As you might guess, there is nothing special about the number ‘2’ in the
previous example. In fact, given any real number a ∈ R, we can define a
function
Ta : R1 −→ R1
by the formula
Ta ([x]) := a [x] ,
3
and essentially the same argument as the one given for T2 shows that Ta is a
linear transformation. As we will see in Theorem 4 below, every linear trans-
formation from R1 to itself is of the form Ta for some a.
1.1.2 General n, m
In this subsection we are studying linear transformations of the form
Rn −→ Rm .
The next example illustrates how an m × n matrix determines a function of
this form. The theorem that follows shows that this function is in fact a linear
transformation.
TM : R2 −→ R3
by
1 2
x1 x1
TM := 0 1 .
x2 x2
−1 0
For example,
4
2
TM = 1 .
1
−2
Then we will see in Theorem 3 below that TM is a linear transformation.
4
More generally, suppose we have an m × n matrix M . Then M determines
a function
TM : Rn −→ Rm
defined by matrix multiplication
x1 x1
TM ... := M ..
.
xn xn
This is always a linear transformation:
Theorem 3. For any matrix M , the function TM : Rn → Rm is a linear
transformation.
Proof. Since the components are not relevant for this computation, I will use
x, y to denote vectors in Rn , instead of n × 1 matrices. So let x, y ∈ Rn and
k ∈ R. Then
TM (x + y) = M (x + y)
= Mx + My
= TM (x) + TM (y)
TM (kx) = M (kx)
= kM x
= kTM (x)
These computations prove that TM is a linear transformation.
It turns out that every linear transformation from Rn to Rm can be expressed
as multiplication by an m × n matrix:
Theorem 4. Let T : Rn → Rm be a linear transformation. Then there is an
m × n matrix M for which T = TM .
I will not prove this here, but if you are feeling ambitious you can try to
prove it as an extra credit assignment.
5
general spaces than Rn (e.g. certain function spaces) then we get many more
linear transformations than just matrices.1
TR b : C(a, b) −→ R.
a
Explicitly, it is given by
Z b
TR b (f ) := f (x) dx.
a
a
Then TR b is a linear transformation because
a
Z b
TR b (f + g) = f (x) + g(x) dx
a
a
Z b Z b
= f (x) dx + g(x) dx
a a
= TR b (f ) + TR b (g)
a a
Z b
TR b (kf ) = kf (x) dx
a
a
Z b
= k f (x) dx
a
= kTR b (f )
a
examples are all finite dimensional. However, we will not deal directly with the notion of
dimension in these notes.
6
Example 5. Let c be a real number between a and b, and define
Tevc : F (a, b) −→ R
by
Tevc (f ) := f (c).
Example 6. Define
defined by
T d (f ) := f 0
dx
7
Remark. When dealing with a linear transformation on a function
space, it is important that the domain be suitably chosen so that ev-
erything makes sense. For example, we couldn’t choose the domain of
T d to be the vector space of continuous functions because there are
dx
continuous functions f that are not differentiable, so the notation f 0
doesn’t even make sense. This is where many of these crazy function
spaces are coming from: We want to study a linear transformation, so
we have to find the correct domain, and sometimes the correct domain
is a little weird.
We will see later that this example is of central interest to our discussion of
Fourier series. Let p > 0 be a real number, and denote the space of twice
differentiable 2p-periodic functions by
PerFun2 (2p) :=
T d2
−λId
: PerFun2 (2p) −→ F (−∞, ∞).
dx2
by the formula
d2
T d2
−λId
(f ) := f − λf.
dx2 dx2
8
Remark. Notice that
T d2
−λId
=T d2 − λTId ,
dx2 dx2
which is to say T d2
−λId
is a linear combination of other linear trans-
dx2
formations. More generally, any linear combination of linear transfor-
mations from V to W is again a linear transformation from V to W . in
other words, the set of linear transformations from V to W is a vector
space.
ker(T ) := {v ∈ V | T (v) = 0} .
The reason this definition is useful to us is the following theorem:
T (u + v) = T (u) + T (v)
= 0+0
= 0
9
ker (T2 ) = [x] ∈ R1 T2 ([x]) = [0]
= [x] ∈ R1 2 [x] = [0]
= [x] ∈ R1 [2x] = [0]
= {[0]}
So the kernel of T2 is the set containing only the zero vector. In [1] we
saw that this is a subspace, thereby confirming Theorem 6.
TN : R2 −→ R2 .
Its kernel is given by
x1 1 2 x1 0
ker (TN ) = ∈ R2 =
x2 2 4 x2 0
x1
= ∈ R2 x1 + 2x2 = 0, and 2x1 + 4x2 = 0
x2
x1
= ∈ R2 x1 + 2x2 = 0
x2
x1
= ∈ R2
−(1/2)x1
1
= x x∈R
−1/2
Note that this is a line (with slope -1/2) through the origin of R2 , and
recall from [1] that the non-trivial subspaces of R2 are precisely the lines
through the origin. So we have again confirmed Theorem 6.
Exercise 8. Let TM : R2 → R3 be the linear transformation from Section 1.1.2,
given by multiplication by the matrix
2 3
1 2
M =4 0 1 5.
−1 0
Compute ker(TM ).
10
Example 11. Consider the linear operator given by differentiation
Exercise 9. Show directly (that is, without appealing to Theorem 6) that the set of
constant functions is a subspace of F (a, b).
1.3.1 ker T d2
−λId
dx2
T d2
−λId
: PerFun2 (2p) −→ F (−∞, ∞)
dx2
This is equivalent to finding the solutions of the following boundary value prob-
lem
f 00 − λf = 0, f (x) = f (x + 2p)
Case 1. λ = α2 > 0: In this case the differential equation becomes
f 00 − α2 f = 0.
11
f (x) = Ax + B.
Again, the periodicity condition f (x) = f (x + 2p) forces A = 0. However, the
constant solution
f (x) = B
is 2p-periodic. So we get
ker T d2 −λId
= {B | B ∈ R} for λ = 0.
dx2
n
nπ
nπ
o if λ = (nπ/p)2
A cos x + B sin x A, B ∈
p p R
for n = 1, 2, 3, . . .
ker T d2 =
dx2
−λId
{B | B ∈ R} λ=0
{0} otherwise
(1)
12
x1 x1
3 1 1 0 x2 = 0
S = x2 ∈ R
.
−3 1 0 0
x3 x3
= ker(TM ),
where
1 1 0
M= .
−3 1 0
So, by Theorem 6, S is automatically a subspace of R3 .
Example 13. Our second example involves the derivative linear trans-
formation. Define the set
Z π
S 0 := f ∈ F (−π, π) f is continuous and f (x) dx = f (1)
−π
0
Suppose we want to show that S is a vector space. We can do this by
realizing it as the kernel of a linear transformation, as follows:
Z π
S0 = f ∈ F (−π, π) | f is continuous and f (x) dx = f (1)
−π
Z π
= f ∈ C(−π, π) f (x) dx − f (1) = 0
−π
= π − Tev
ker TR−π 1
where
π − Tev : C(−π, π) −→ R
TR−π 1
Here we are using the fact that any linear combination of linear trans-
formations is again a linear transformation. See the Remark at the end
of Subsection 1.2.1
13
T (v) = λv (2)
has a non-zero solution v ∈ V . These values λ are called the eigenvalues, and
any non-zero solution v of equation (2) is called an eigenvector for λ.
The textbook [2] has a pretty good discussion for the case when V = Rn ,
in which case T = TM is given by matrix multiplication M . The reason I have
included this section in these notes is to work out the following function space
example.
d2
2.1 The Eigenvalue Problem for dx2
Let p > 0 and consider the linear transformation:
We want to solve the eigenvalue problem for this operator. So we want to find
the values of λ ∈ C for which the following subset contains more than just the
zero function:
d2
2
f ∈ PerFun (2p) f = λf . (3)
dx2
Observe that
d2
f ∈ PerFun2 (2p) f = λf = ker T d2
−λId
,
dx2 dx2
Fact: It can be shown that T d2 only has real eigenvalues (I will not prove
dx2
this, but if you are daring you can try to prove it for extra credit).
So the analysis in Section 1.3.1 is indeed sufficient to solve the eigenvalue prob-
lem. The conclusion of this analysis is Equation (1), where we see that the
eigenvalues of T d2 are
dx2
0, (nπ/p)2 | n = 1, 2, 3, . . . ,
14
nπ nπ
A cos x + B sin x
p p
where A, B are real numbers with (A, B) 6= (0, 0), and the eigenvectors associ-
ated to 0 are the nonzero constant functions (recall that eigenvectors cannot be
zero, by definition).
In particular, taking all coefficients to be 1 and separating the sines and
cosines, we have that the set
π 2π π 2π
1, cos x , cos x , . . . , sin x , sin x ,... (4)
p p p p
represents the eigenvectors of T d2 in the following sense: Any eigenvector with
dx2
eigenvalue λ can be written as a linear combination of elements from the set
(4). Note that the functions appearing in this linear combination will necessarily
have the same eigenvalue λ.
Exercise 10. Let p > 0 and define C02 (0, p) to be the subspace of F (0, p) consisting
of functions f for which f, f 0 , f 00 are continuous, and f (0) = f (p) = 0. Solve the
eigenvalue problem for the linear transformation
to show that the eigenvalues are (nπ/p)2 | n = 1, 2, 3, . . . and the eigenvectors asso-
˘ ¯
3 Inner Products
Let V be a vector space. An inner product on V is a mathematical device that
allows one to measure lengths of vectors and angles between vectors. We will
not define these in general, instead we will only discuss the two inner products
that will arise in this class.
15
3.1 The Standard Inner Product on Rn
The standard inner product on Rn is defined by the dot product
hx1 , . . . , xn i • hy1 , . . . , yn i := x1 y1 + . . . + xn yn .
In an attempt to simplify notation, when the exact components of the vector
are not important, I will use x rather than hx1 , . . . , xn i.
The key properties that the standard inner product satisfies are the following:
For all x, x1 , x2 , y ∈ Rn , and every k ∈ R we have
1. x • y = y • x;
2. x • x ≥ 0;
3. x • x = 0 if and only if x = 0;
4. (x1 + x2 ) • y = x1 • y + x2 • y;
5. (kx) • y = k (x • y).
Exercise 11. Use Properties 1, 4, and 5 to show
y • (x1 + x2 ) = y • x1 + y • x2
and
x • (ky) = k (x • y) .
We can use the following formula from vector calculus to measure the angle
θ between two vectors x, y ∈ R2 :
x•y
cos(θ) = . (5)
kxk kyk
We say that two vectors x and y are orthogonal if x • y = 0. In light of
Formula (5), two vectors are orthogonal if and only if they are perpendicular
(meet at a right angle). More generally, we say that a set of vectors {x1 , . . . , xk }
in Rn is orthogonal if every pair is orthogonal: xi • xj = 0 for all i 6= j.
16
Example 15. The set
Exercise 13. Prove Theorem 7. Feel free to refer to the proof of Theorem 7.7.1 in
[2] for help.
other vector’ in Rn by taking linear combinations – if one of the vectors were removed from
this set then this would not be possible, and the set would be ‘incomplete’.
17
Exercise 14. Show that
» – » –
1 1
,
1 −1
are each eigenvectors for the linear transformation determined by the matrix
» –
0 2
.
2 0
Show that
» – » –ff
1 1
,
1 −1
is an orthogonal basis, and find the coefficients for the vector
» –
3
4
in this basis.
18
Exercise 15. Let a ∈ R, and f a 2p-periodic function defined on R. Show that
Z p Z a+2p
f (x) dx = f (x) dx.
−p a
These inner products satisfy the following key properties (compare with the
standard inner product on Rn ): For all f, f1 , f2 , g ∈ V and every k ∈ R
1. (f, g) = (g, f );
2. (f, f ) ≥ 0;
3. (f, f ) = 0 if and only if f = 0;
4. (f1 + f2 , g) = (f1 , g) + (f2 , g);
19
mπ nπ
3. sin p x , sin p x = 0 for all integers with n 6= m;
p p
(m − n)π
Z Z
mπ nπ 1 (m + n)π
cos x cos x dx = cos x + cos x dx
−p p p 2 −p p p
1 p (m + n)π
= sin x
2 (m + n)π p
p
p (m − n)π
+ sin x
(m − n)π p −p
= 0.
Proof of 3: This is the same as in the proof of 2, except you should use the
identity
1
(cos(A − B) − cos(A + B)) .
sin(A) sin(B) =
2
I will leave this computation for the interested reader.
While we are at it, we may as well compute the (square of the) norm of each
element in this orthogonal set. First the easy one:
Z p
2
k1k = 1 dx = 2p
−p
20
For the trig functions, take m > 0 an integer. Then, using the trig identities
again we get
2 2
mπ mπ
cos x = sin x = p.
p p
n “ ” “ ” “ ” o
π 2π 3π
Exercise 16. Show that sin p
x , sin p
x , sin p
x , . . . is an orthogonal
set for C02 (0, p).
3.4 Completeness
It turns out the notion of ‘orthogonal basis’ does not carry over well to C(a, b)
or PerFun2 (2p) (because they are infinite dimensional), however the notion of
an orthogonal set being ‘complete’ does. Theorem 7 provides inspiration for the
next definition:
Definition 8. Let V be a subspace of C(a, b) or PerFun2 (2p). An orthogonal
set {f1 , . . . , fn , . . .} ⊆ V is complete if for every g ∈ V we have
21
The following theorem is of fundamental importance to the study of Fourier se-
ries. I will not include its proof, which relies on some technical details involving
convergence that are beyond the scope of this course.
Z p
1 nπ
an = f (x) cos x dx
p −p p
Z p
1 nπ
bn = f (x) sin x dx
p −p p
Proof. This is just unravelling the definitions. By Theorem 9 together with the
definition of the term ‘complete’, we have
∞
(f,cos( π x)) (f,sin( πp x))
X
(f,1) p π π
f (x) = 2p + p cos px + p sin px
n=1
∞
a0 X
= + an cos nπ
p x + bn sin nπ
p x ,
2 n=1
where
22
1
a0 = (f, 1)
p
1 p
Z
= f (x) dx
p −p
1
an = f, cos nπ p x
p
1 p
Z
nπ
= f (x) cos x dx
p −p p
1
bn = f, sin nπ p x
p
1 p
Z
nπ
= f (x) sin x dx.
p −p p
This is exactly what we needed to show.
Exercise 17. (Sine Series) In Exercise 10 and 15 we saw that the set
„ « „ « „ « ff
π 2π 3π
sin x , sin x , sin x , . . . ⊆ C02 (0, p)
p p p
consists of orthogonal eigenvectors for
It turns out that this set is complete in C02 (0, p) (you may assume this statement
without proof ). Use these facts to find an analogue of Corollary 10 for this set-up.
(Hint: You will arrive at the sine-series for a function.)
References
[1] D. Duncan. Notes on Linear Algebra. Unpublished. 2011.
[2] W. Wright, D. Zill. Advanved Engineering Mathematics. 4 ed.
Jones and Bartlett. 2011.
23