You are on page 1of 156

Linear Transformations

Prof. Nicholas Zabaras


Center for Informatics and Computational Science
https://cics.nd.edu/
University of Notre Dame
Notre Dame, Indiana, USA

Email: nzabaras@gmail.com
URL: https://www.zabaras.com/

October 8, 2019
Course Web Site: https://www.zabaras.com/engineering-mathematics

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 1
Contents
The idea of a linear transformation,

 The matrix of a linear transformation, Change of basis,

 Matrix products AB match transformations TS, Inverse


Linear Transformation, Transition matrices and similarity

 The Jordan Form, Discrete Fourier Transform, Basis for


function space, Legendre and Chebyshev polynomials

• Gilbert Strang, Introduction to Linear Algebra, 5th Edition, Chapter 8.


Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 2
Introduction to Linear
Transformations

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
Linear Transformations
1 A linear transformation T takes vectors 𝒗 to vectors 𝑇(𝒗).
Linearity requires 𝑇(𝑐 𝒗 + 𝑑𝒘) = 𝑐 𝑇(𝒗) + 𝑑𝑇(𝒘). Note
𝑇(𝟎) = 𝟎 so 𝑇(𝒗) = 𝒗 + 𝒖0 is not linear.
2 The input vectors 𝒗 and outputs 𝑇(𝒗) can be in ℝ𝑛 or
matrix space or function space.
3 If 𝑨 is 𝑚 by 𝑛, 𝑇(𝒙) = 𝑨𝒙 is linear from the input space ℝ𝑛
to the output space ℝ𝑚 .
𝑑𝑓
4 The derivative 𝑇(𝑓) = is linear. The integral 𝑇 + 𝑓 =
𝑑𝑥
𝑥
‫׬‬0 𝑓 𝑡 𝑑𝑡 is its pseudoinverse.
5 The product ST of two linear transformations is still linear
: (𝑆𝑇)(𝒗) = 𝑆 (𝑇(𝒗))

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 4
Introduction to Linear Transformations
A linear transformation is a function T that maps a vector
space V into another vector space W:
T : V 
mapping
W, V ,W : vector space

V: the domain of T
W: the co-domain of T
Two axioms of linear
Transformations
(1) T (u  v)  T (u)  T (v), u, v  V
(2) T (cu)  cT (u), c  R

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 5
Introduction to Linear Transformations
Image of 𝒗 under T:

If 𝒗 is in V and 𝒘 is in W such that

T ( v)  w
Then 𝒘 is called the image of
𝒗 under T .

The range of T:

The set of all images of vectors in V.


range(T )  {T ( v) | v V }
The pre-image of 𝒘:
The set of all 𝒗 in V such that 𝑇(𝒗) = 𝒘.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 6
Introduction to Linear Transformations
(1) A linear transformation is said to be operation
preserving.

T (u  v)  T (u)  T (v) T (cu)  cT (u)

Addition Addition Scalar Scalar


in V in W multiplication multiplication
in V in W

(2) A linear transformation T : V  V from a vector space


into itself is called a linear operator.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 7
Introduction to Linear Transformations
A linear transformation from a vector space into itself is
called a linear operator.
T (v1 , v 2 )  (v1  v 2 , v1  2v 2 )
Proof:
u  (u1 , u2 ), v  (v1 , v2 ) : vector in R 2 , c : any real number
(1) Vector addition :
u  v  ( u1 , u2 )  (v1 , v2 )  ( u1  v1 , u2  v2 )

T (u  v)  T (u1  v1 , u2  v2 )
 ((u1  v1 )  (u2  v2 ), (u1  v1 )  2(u2  v2 ))
 ((u1  u2 )  (v1  v2 ), (u1  2u2 )  (v1  2v2 ))
 (u1  u2 , u1  2u2 )  (v1  v2 , v1  2v2 )
 T (u)  T ( v)
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 8
Introduction to Linear Transformations
(2) Scalar multiplication
cu  c(u1 , u2 )  (cu1 , cu2 )
T (cu)  T (cu1 , cu 2 )  (cu1  cu 2 , cu1  2cu 2 )
 c(u1  u 2 , u1  2u 2 )
 cT (u)
Therefore, T is a linear transformation.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 9
Introduction to Linear Transformations
Functions that are not linear transformations
(a) f ( x)  sin x
sin( x1  x2 )  sin( x1 )  sin( x2 )  f ( x )  sin x is not a
sin( 2  3 )  sin( 2 )  sin( 3 ) linear transformation

(b) f ( x)  x 2  f ( x )  x 2 is not a linear


( x1  x2 ) 2  x12  x22 transformation
(1  2) 2  12  2 2

(c ) f ( x )  x  1
f ( x1  x2 )  x1  x2  1
f ( x1 )  f ( x2 )  ( x1  1)  ( x2  1)  x1  x2  2
f ( x1  x2 )  f ( x1 )  f ( x2 )  f ( x )  x  1 is not a
linear transformation
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 10
Introduction to Linear Transformations

(1) f ( x)  x  1 is called a linear function because its


graph is a line. But

(2) f ( x)  x  1 is not a linear transformation from a


vector space R into R because it preserves neither
vector addition nor scalar multiplication.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 11
Introduction to Linear Transformations
 Zero transformation:
T :V  W T ( v)  0, v V
 Identity transformation:
T :V  V T ( v)  v, v V
 Theorem: (Properties of linear transformations)
T : V  W , u, v  V
(1) T (0)  0
(2) T ( v)  T ( v)
(3) T (u  v)  T (u)  T ( v)
(4) If v  c1v1  c2 v2   cn v n
Then T (v)  T (c1v1  c2 v 2   cn v n )
 c1T (v1 )  c2T (v 2 )   cnT (v n )
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 12
Introduction to Linear Transformations
 Theorem: (The linear transformation given by a matrix)
Let A be an mn matrix. The function T defined by
T ( v)  Av
is a linear transformation from Rn into Rm.

 Note: R n vector R m vector


 a11 a12 a1n   v1   a11v1  a12v 2   a1nv n 
a a22 a2 n   v2   a21v1  a22 v2   a2 n v n 
Av   21 
    
    
 am 1 am 2 amn   vn   am 1v1  am 2 v2   amn vn 
T ( v)  Av
T : Rn 
 R m
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 13
Introduction to Linear Transformations
A projection in R3
The linear transformation T : R 3  R 3 is given by
1 0 0 
A  0 1 0 
 
 0 0 0 
is called a projection in R3.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 14
Introduction to Linear Transformations
A linear transformation from Mmn into Mn m

T ( A)  AT (T : M mn  M nm )
Show that T is a linear transformation.
Solution:
A, B  M mn
T ( A  B )  ( A  B )T  AT  B T  T ( A)  T ( B )

T (cA)  (cA)T  cAT  cT ( A)

Therefore, T is a linear transformation from


Mmn into Mn m.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 15
Linear Transformations
When a matrix 𝑨 multiplies a vector 𝒗, it "transforms" 𝒗 into
another vector 𝑨𝒗. In goes 𝒗, out comes 𝑇(𝒗) = 𝑨𝒗.
A transformation T follows the same idea as a function.
In goes a number 𝑥, out comes 𝑓(𝑥).
The deeper goal is to see all vectors 𝒗 at once. We are
transforming the whole space V when we multiply every 𝒗
by 𝑨.
Start again with a matrix 𝑨. It transforms 𝒗 to 𝑨𝒗. It
transforms 𝒘 to 𝑨𝒘. Then we know what happens to 𝒖 =
𝒗 + 𝒘. There is no doubt about Au, it has to equal 𝑨𝒗 +
𝑨𝒘.
Matrix multiplication 𝑇(𝒗) = 𝑨𝒗 gives a linear
transformation.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 16
Linear Transformations
A transformation T assigns an output 𝑇(𝒗) to each input
vector 𝒗 in V.

The transformation is linear if it meets these requirements


for all 𝒗 and 𝒘:

(a) 𝑇(𝒗 + 𝒘) = 𝑇(𝒗) + 𝑇(𝒘) (b) 𝑇(𝑐𝒗) = 𝑐𝑇(𝒗) for all c.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 17
Linear Transformations
If the input is 𝒗 = 𝟎, the output must be 𝑇(𝒗) = 𝟎. We
combine rules (a) and (b) into one:

Linear transformation 𝑇(𝑐𝒗 + 𝑑𝒘) must equal 𝑐𝑇(𝒗) +


𝑑𝑇(𝒘).

Test matrix multiplication for linearity: 𝑨(𝑐𝒗 + 𝑑𝒘) =


𝑐𝑨𝒗 + 𝑑𝑨𝒘 is true.

A linear transformation is highly restricted. Suppose T adds


𝒖0 to every vector. Then 𝑇(𝒗) = 𝒗 + 𝒖0 and 𝑇(𝒘) = 𝒘 +
𝒖0. This isn't linear. Applying T to 𝒗 + 𝒘 produces 𝒗 +
𝒘 + 𝒖0. That is not the same as 𝑇 𝒗 + 𝑇 𝒘 .

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 18
Linear Transformations
Shift is not linear 𝒗 + 𝒘 + 𝒖0 is not 𝑇 𝒗 + 𝑇 𝒘 =
𝒗 + 𝒖0 + 𝒘 + 𝒖0 . The exception is when 𝒖0 = 0.

The transformation reduces to 𝑇( 𝒗) = 𝒗. This is the


identity transformation (nothing moves, as in
multiplication by the identity matrix). That is certainly
linear.

In this case the input space V is the same as the output


space W.

The linear-plus-shift transformation T(v) = Av + u0 is called


"affine". Straight lines stay straight although T is not linear.
Computer graphics works with affine transformations,
because we must be able to move images.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 19
Linear Transformations
Example Choose a fixed vector 𝒂 = ( 1, 3, 4), and let 𝑇 (𝒗)
be the dot product 𝒂 · 𝒗:
The output is 𝑇(𝒗) = 𝒂 · 𝒗 = 𝑣1 + 3𝑣2 + 4𝑣3.

Dot products are linear. The inputs 𝒗 come from three-


dimensional space, so V = ℝ3 .

The outputs are just numbers, so the output space is W =


ℝ1 . We are multiplying by the row matrix 𝑨 =
[ 1 3 4]. Then 𝑇 (𝒗) = 𝑨𝒗.

You will get good at recognizing which transformations are


linear. If the output involves squares or products or lengths,
𝑣12 or 𝑣1 𝑣2 or 𝒗 , then T is not linear.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 20
Linear Transformations
Example The length 𝑇(𝒗) = 𝒗 is not linear.

Requirement (a) for linearity would be 𝒗 + 𝒘 = 𝒗 +


𝒘

Requirement (b) would be 𝑐𝒘 = 𝑐 𝒘 - Both are false!

Not (a): The sides of a triangle satisfy an inequality ԡ𝒗 +

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 21
Linear Transformations
Example (Rotation) T is the transformation that rotates every
vector by 30° .
The "domain" of T is the xy plane (all input vectors 𝒗).

The "range" of T is also the xy plane ( all rotated vectors T (


v) ).
We described T without a matrix: rotate the plane by 30° .

Is rotation linear? Yes it is. We can rotate two vectors and


add the results. The sum of rotations 𝑇( 𝒗) + 𝑇( 𝒘) is the
same as the rotation 𝑇( 𝒗 + 𝒘) of the sum.

The whole plane is turning together, in this linear


transformation.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 22
Introduction to Linear Transformations
Show that the L.T. T : R 2  R 2 given by the matrix
cos   sin  
A  
 sin  cos  
has the property that it rotates every vector in R2
counterclockwise about the origin through the angle .
Solution:
v  ( x , y )  ( r cos  , r sin  ) (polar coordinates)

r: the length of v
:the angle from the
positive x-axis
counterclockwise to the
vector 𝒗
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 23
Introduction to Linear Transformations
cos   sin    x  cos   sin   r cos  
T ( v)  Av      
 sin  cos    y   sin  cos    r sin  
r cos  cos   r sin  sin  

r sin  cos   r cos  sin  
r cos(   )

 r sin(   ) 
r:the length of T(v)
 +:the angle from the positive x-axis counterclockwise
to the vector T(v)
Thus, T(v) is the vector that results from rotating the
vector v counterclockwise through the angle .

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 24
Linear Transformations
The Figure shows the line from 𝒗 to 𝒘 in the input space. It
also shows the line from 𝑇(𝒗) to 𝑇( 𝒘) in the output space.
Linearity tells us: Every point on the input line goes onto
the output line. And more than that: Equally spaced points
go to equally spaced points.
The middle point 𝒖 = ½𝒗 + ½𝒘 goes to the middle point
𝑇(𝒖) = ½𝑇(𝒗) + ½𝑇(𝒘).

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 25
Linear Transformations
The second figure moves up a dimension. Now we have
three corners 𝒗1 , 𝒗2 , 𝒗3 .
Those inputs have three outputs 𝑇(𝒗1 ), 𝑇(𝒗2 ), 𝑇(𝒗3 ). The
input triangle goes onto the output triangle. Equally spaced
points stay equally spaced (along the edges, and then
between the edges). The middle point 𝒖 = ½ ( 𝒗1 + 𝒗2 +
𝒗3) goes to the middle point T(u) = ½(T(𝒗1 ) + T(𝒗2 ) + T(𝒗3 )).

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 26
Linear Transformations
The rule of linearity extends to combinations of n vectors:
Linearity 𝒖 = 𝑐1 𝒗𝟏 + ⋯ + 𝑐𝑛 𝒗𝒏 must transform to

𝑇 𝒖 = 𝑐1 𝑇 𝒗𝟏 + ⋯ + 𝑐𝑛 𝑇(𝒗𝒏 )

The 2-vector rule starts the 3-vector proof:

𝑇 (𝑐𝒖 + 𝑑𝒗 + 𝑒𝒘) = 𝑇 (𝑐𝒖) + 𝑇 (𝑑𝒗 + 𝑒𝒘)

Then linearity applies to both of those parts, to give

𝑐𝑇(𝒖) + 𝑑𝑇(𝒗) + 𝑒𝑇(𝒘).

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 27
Introduction to Linear Transformations
 Ex: (Linear transformations and bases)
Let T : R 3  R 3 be a linear transformation such that
T (1,0,0)  (2,1,4)
T (0,1,0)  (1,5,2)
T (0,0,1)  (0,3,1)
Find T(2, 3, -2).
Solution:
(2,3,2)  2(1,0,0)  3(0,1,0)  2(0,0,1)
T (2, 3, 2)  2T (1, 0, 0)  3T (0,1, 0)  2T (0, 0,1) (T is a L.T.)
 2(2, 1, 4)  3(1, 5, 2)  2(0, 3,1)
 (7, 7, 0)

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 28
Basis
Then-vector rule 𝑇 𝒖 = 𝑐1 𝑇 𝒗𝟏 + ⋯ + 𝑐𝑛 𝑇(𝒗𝒏 ) leads to
the most important fact about linear transformations:

Suppose you know 𝑇 (𝒗) for all vectors 𝒗𝟏 , • • • , 𝒗𝒏 in a


basis. Then you know 𝑇 (𝒖) for every vector 𝒖 in the
space.

You see the reason: Every 𝒖 in the space is a combination of


the basis vectors 𝒗𝒋 .

Then linearity tells us that 𝑇(𝒖) is the same combination of


the outputs T(𝒗𝒋 ).

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 29
Basis
Example The transformation T takes the derivative of the
input: 𝑇(𝑢) = 𝑑𝑢/ 𝑑𝑥.
How do you find the derivative of 𝑢 = 6 − 4𝑥 + 3𝑥2 ?
You start with the derivatives of 1, 𝑥, and 𝑥2. Those are the
basis vectors. Their derivatives are 0, 1, and 2𝑥. Then you
use linearity for the derivative of any combination:
𝑑𝑢
= 6 ( derivative of 1) - 4 ( derivative of x) + 3 ( derivative
𝑑𝑥
of 𝑥2 ) = −4 + 6𝑥.

All of calculus depends on linearity! Calculus finds a few


key derivatives, for 𝑥𝑛 and sin 𝑥 and cos 𝑥 and 𝑒𝑥 . Then
linearity applies to all their combinations.

The only rule special to calculus is the chain rule. That


produces the derivative of a chain of functions f (g(x) ).
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 30
Basis
Nullspace of T(u) = du/dx. For the nullspace we solve
𝑇(𝑢) = 0. The derivative is zero when u is a constant
function. So the one-dimensional nullspace is a line in
function space-all multiples of the special solution u = 1.

Column space of T (u) = du/ dx. In our example the input


space contains all quadratics a+ bx+ cx2 . The outputs (the
column space) are all linear functions b + 2cx. Notice that
the Counting Theorem is still true : r + ( n - r) = n.

Dimension ( column space) +dimension ( nullspace) = 2+ 1


= 3 = dimension (input space)

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 31
The Kernel and Range of a Linear Transformation
 Kernel of a linear transformation T:
Let T : V  W be a linear transformation
Then the set of all vectors v in V that satisfy T ( v)  0
is called the kernel of T and is denoted by ker(T).

ker(T )  {v | T (v)  0, v  V }

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 32
The Kernel and Range of a Linear Transformation
 Theorem: The kernel is a subspace of V.
The kernel of a linear transformation T : V  W is a
subspace of V.
Proof: T (0)  0 (from our 1st Theorem)
 ker(T ) is a nonempty subset of V
Let u and v be vectors in the kernel of T . Then
T (u  v)  T (u)  T ( v)  0  0  0  u  v  ker(T )
T (cu)  cT (u)  c0  0  cu  ker(T )
Thus, ker(T ) is a subspace of V .
Corollary:
Let T : R n  R m be the L.T given by T (x)  Ax
Then the kernel of T is equal to the solution space of Ax  0
T (x)  Ax (a linear transformation T : R n  R m )
 ker ( T )  N ( A )   x | A x  0,  x  R n
 ( a subspace of R
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
n
)
33
The Kernel and Range of a Linear Transformation
 x1 
 1  1 2   
T (x)  Ax    x2  (T : R 3  R 2 ) ker(T )  ?

 1 2 3   
Solution:  x3 
ker(T )  {( x1 , x2 , x3 ) | T ( x1 , x2 , x3 )  (0,0), x  ( x1 , x2 , x3 )  R3}
 x1 
T ( x1 , x2 , x3 )  (0, 0)   1  1  2    0 
 1 2  x2   
3    0 
 x3 
 1  1  2 0  G . E  1 0 1 0 
 1 2    
 3 0   0 1 1 0 
 x1   t  1
 
  x2     t   t  1
 
 ker(T )  { t (1, 1,1) | t  real number }
 x3   t   1   span{(1, 1,1)} = N(A)
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 34
Finding a Basis for a Kernel
Let T : R 5  R 4 be defined by T (x)  Ax, where x is in R 5 and
1 2 1 1
0
2 1 3 1 0  Find a basis for ker(T) as a
A  subspace of R5.
 1 0 2 0 1 
 
0 0 0 2 8
1 2 1 1 0 
0 1 0 0 1 0 
2
2 1 3 1 0 0  G . E  0 1 1 0 2 0 
Sol:
 A 0   1 0 2 0 1 0 
 
0 0 0 1 4 0
   
0 0 0 2 8 0 0 0 0 0 0 0
s t
 x1   2 s  t   2   1 
x    1 2
 2  s  2 t      B  {( 2, 1, 1, 0, 0) and
 x   x3    s   s  1   t  0  (1, 2, 0,  4, 1)} is a basis
       
x
 4   4 t   0   4  of the kernel of T
 x5   t   0   1 
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 35
Finding a Basis for a Kernel
The range of a linear transf. T : V  W is a subspace of W .
Proof: T (0)  0 (Thm)  range(T ) is a nonempty subset of W
Let T (u) and T ( v ) be vector in the range of T
T (u  v)  T (u)  T ( v)  range(T ) (u V , v V  u  v V )
T (cu)  cT (u)  range(T ) (u V  cu V )
Therefore, range(T ) is a subspace of W

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 36
Finding a Basis for a Kernel
Let T : R n  R m be the L.T. represented by T (x)  Ax,
then the range of T is equal to the column space of A
 range(T )  C ( A)  { Ax  x  R n }

 Rank of a linear transformation T: V→W:


rank (T )  the dimension of the range of T
 Nullity of a linear transformation T: V→W:

nullity (T )  the dimension of the kernel of T


 Note:
Let T : R n  R m be the L.T. represented by T (x)  Ax, then
rank (T )  rank ( A)  dim[C ( A)]
nullity(T )  nullity ( A)  dim[ N ( A)]
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 37
Finding a Basis for a Kernel
Let T : R 5  R 4 be defined by T (x)  Ax, where x  R 5 and
1 2 1 1
0
2 1 3 1 0  Find a basis for the range(T).
A
 1 0 2 0 1 
 
0 0 0 2 8
Sol:  1 2 0 1 1  1 0 2 0 1 
2 1 3 1 0  0 1 1 0 2 
A   G.E
 B
 1 0 2 0 1  0 0 0 1 4 
   
0 0 0 2 8 0 0 0 0 0 
c1 c2 c3 c4 c5 w1 w2 w3 w4 w5
 w , w , w  is a basis for C(B)
 

 1 2 4
 
c , c , c  is a basis for C ( A)
 1 2 4 
 (1, 2,  1, 0), (2, 1, 0, 0), (1, 1, 0, 2)is a basis for the range of T
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 38
Sum of Rank and Nullity
 Thm: Sum of rank and nullity
Let T : V  W be a L.T. from an n - dimensional
vector space V into a vector space W ,
then rank (T )  nullity (T )  n,
i .e ., dim(range of T )  dim(kernel of T )  dim(domain of T )

Pf: Let T is represented by a matrix Amn


Assume rank ( A)  r (i.e., the number of leadingvariables)
(1) rank (T )  dim(range of T )  dim(column space of A)
 rank ( A)  r T ( x )  Ax
(2) nullity (T )  dim(kernel of T )  dim( solution space of A)
 nr
 rank (T )  nullity(T )  r  ( n  r )  n
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 39
Matrix Representation
What is the matrix for d/ dx?

We have a linear transformation T = d/ dx. We know what T


does to the basis functions:
2
𝑑𝑣1 𝑑𝑣2 𝑑𝑣3
𝑣1 , 𝑣2 , 𝑣3 = 1, 𝑥, 𝑥 , = 0, = 1 = 𝑣1 , = 2𝑥 = 2𝑣2
𝑑𝑥 𝑑𝑥 𝑑𝑥

The 3-dimensional input space V ( = quadratics) transforms


to the 2-dimensional output space W (= linear functions). If
𝑣1 , 𝑣2 , 𝑣3 were vectors, I would know the matrix.
0 1 0 𝑑
𝑨= = matrix form of the derivative T =
0 0 2 𝑑𝑥
𝑑
The linear transformation is perfectly copied by the
𝑑𝑥
matrix multiplication 𝑨𝒖.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 40
Basis
𝑑𝑢
If the input 𝑢 = 𝑎 + 𝑏𝑥 + output 𝑐𝑥 2 , 𝑡ℎ𝑒 = 𝑏 + 2𝑐𝑥 can be
𝑑𝑥
represented in a matrix form as:

𝑎
0 1 0 𝑏 𝑏
𝑨𝒖 = =
0 0 2 𝑐 2𝑐

𝑑𝑢
Output = 𝑏 + 2𝑐𝑥.
𝑑𝑥

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 41
Basis
Next we look at integrals. They give the pseudoinverse 𝑻+
of the derivative!
I can't write 𝑇 −1 and I can't say "inverse of T" when the
derivative of 1 is 0.
Example Integration T+ is also linear:
𝑥 1
‫׬‬0 𝐷 + 𝐸𝑥 𝑑𝑥 = 𝐷𝑥 + 𝐸𝑥 2
2
The input basis is now 1, x. The output basis is 1, x, x2 . The
matrix A+ for 𝑇 + is 3 by 2:
Input: 𝒗 = 𝑫 + 𝑬𝒙,
𝟏 𝟏
Output: 𝑻+ 𝒗 = ‫ 𝑫 𝟎׬‬+ 𝑬𝒙 𝒅𝒙 = 𝑫𝒙 + 𝑬𝒙𝟐 or
𝟐
𝟎
𝟎 𝟎
+ 𝑫 𝑫
𝑨 𝒗= 𝟏 𝟎 = 𝟏
𝟎 𝟏/𝟐 𝑬 𝑬
𝟐
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 42
Basis
The Fundamental Theorem of Calculus says that integration is the
(pseudo )inverse of differentiation. For linear algebra, the
+
matrix 𝑨 is the (pseudo ) inverse of the matrix 𝑨:
𝟎 𝟎 𝟎 0 0
𝟎 𝟏 𝟎
𝑨+ 𝑨 = 𝟏 𝟎 = 0 1 0
𝟎 𝟏/𝟐 𝟎 𝟎 𝟐 0 0 1
𝟏 0
or 𝑨𝑨+ =
0 𝟏

The derivative of a constant function is zero. That zero is on


the diagonal of 𝑨+ 𝑨.

Calculus wouldn't be calculus without that 1-dimensional


nullspace of T = d/ dx.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 43
Finding the Rank and Nullity
 Finding the rank and nullity of a linear transformation
Find the rank and nullity of the L.T. T : R 3  R 3 defined by
 1 0 2 
A   0 1 1 
 0 0 0 
Sol:
rank (T )  rank ( A)  2
nullity(T )  dim(domain of T )  rank (T )  3  2  1

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 44
One-to-One Transformation
 One-to-one:
A function T : V  W is called one - to - one if the preimage
of every w in the range of T consists of a single vector.

T is one - to - one if and only if for all u and v in V,


T(u) = T(v) implies that u = v.

one-to-one not one-to-one

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 45
Onto Linear Tranformation
A function T : V  W is said to be onto if every element
in W has a preimage in V
i.e., T is onto W when range(T)=W.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 46
One-to-One Linear Transformations
 Thm: (One-to-one linear transformation)
Let T : V  W be a L.T.,
T is one - to - one if and only if ker (T )  {0}
i.e., The addtive unit element in V is mapped onto

Pf: Suppose T is 1 - 1 the additive unit element in W.


Then T (v)  0 can have only one solution : v  0
i.e., ker (T )  {0}

Suppose ker (T )  {0} and T ( u)  T (v )


T (u  v)  T (u )  T (v)  0
T is a L.T.
u  v  ker (T )  u  v  0  T is one - to - one L.T.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 47
One-to-One Linear Transformations
 Ex: One-to-one and not one-to-one linear transformation
(a) The L.T. T : M mn  M nm given by T ( A)  AT
is one - to - one.
Because its kernel consists of only the m  n zero matrix
i.e., ker(T) = {0mn }.
(b) The zero transformation T : R 3  R 3 is not one - to - one.
Because its kernel is all of R3.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 48
Onto Linear Transformations
 Onto linear transformation
Let T : V  W be a L.T., where W is finite dimensional,
then T is onto iff the rank of T is equal to the dimension of W .
 Thm: (One-to-one and onto linear transformation)
Let T : V  W be a L.T. with vector space V and W both of
dimension n, then T is one - to - one iff it is onto.

Pf: If T is one - to - one, then ker (T )  {0} and dim( ker (T ))  0


rank (T )  dim( range(T ))  n  dim( ker (T ))  n  dim(W )
Consequent ly, T is onto.
If T is onto, then dim( range of T )  dim(W )  n
dim( ker (T ))  n  dim(range of T )  n  n  0
Therefore, ker(T) = {0}. T is one - to - one. (from earlier Thm)
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 49
Examples
The L.T. T : R n  R m is given by T (x)  Ax, find the nullity and rank
of T and determine whether T is one - to - one, onto, or neither.

1 2 0  1 2 
( a ) A  0 1 1  (b) A  0 1 
   
 0 0 1   0 0 
1 2 0 
1 2 0  ( d ) A  0 1 1 
(c ) A  
0 1  1  
Sol:  0 0 0 
dim(domain
T:Rn→Rm rank(T) nullity(T) 1-1 onto
of T)
(a)T:R3→R3 3 3 0 Yes Yes
(b)T:R2→R3 2 2 0 Yes No
(c)T:R3→R2 3 2 1 No Yes
(d)T:R3→R3 3 2 1 No No
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 50
Isomorphism
A linear transformation T : V  W that is one to one and onto is called
an isomorphism. Moreover, if V and W are vector spaces such that
there exists an isomorphism from V to W , then V and W are said to
be isomorphic to each other.
 Thm: (Isomorphic spaces and dimension)
Two finite-dimensional vector space V and W are
isomorphic if and only if they are of the same dimension.
Pf: Assume that V is isomorphic to W , where V has dimension n.
 There exists a L.T. T :V W that is one to one and onto.
T is one - to - one  dim( Ker (T ))  0
 dim(range of T )  dim(domain of T )  dim( Ker (T ))
 n0  n
T is onto.
 dim( range of T )  dim(W )  n Thus dim(V )  dim(W )  n
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 51
Isomorphism
 Ex: (Isomorphic vector spaces)
The following vector spaces are isomorphic to each other.

(a ) R 4  4 - space
(b) M 41  space of all 4 1 matrices
(c) M 22  space of all 2  2 matrices
(d ) P3 ( x)  space of all polynomial s of degree 3 or less
(e) V  {( x1 , x2 , x3 , x4 , 0), xi is a real number}
(subspace of R 5 )

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 52
Examples of Transformations
Example Project every 3-dimensional vector onto the
horizontal plane 𝑧 = 1.

The vector 𝒗 = (𝑥, 𝑦, 𝑧) is transformed to 𝑇 (𝒗) = ( 𝑥, 𝑦, 1).


This transformation is not linear.

Why not? It doesn't even transform 𝒗 = 0 into 𝑇(𝒗) = 0.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 53
Examples of Transformations
Example Suppose A is an invertible matrix.

Certainly 𝑇(𝒗 + 𝒘) = 𝑨𝒗 + 𝑨𝒘 = 𝑇 (𝒗) + 𝑇 (𝒘).


Another linear transformation is multiplication by 𝑨−1 .

This produces the inverse transformation 𝑻−𝟏 , which brings


every vector 𝑇(𝑣) back to 𝒗: 𝑇 −1 (T(𝒗)) =𝒗 matches the
matrix multiplication 𝑨−1 (𝑨𝒗) = 𝒗.

Example If 𝑇(𝒗) = 𝑨𝒗 and S(u) = Bu, then the product


T(S(u)) matches the product ABu. We are reaching an
unavoidable question.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 54
Examples of Transformations
Are all linear transformations from V = ℝ𝑛 to W = ℝ𝑚
produced by matrices?

When a linear T is described as a "rotation" or "projection"


or" ..." , is there always a matrix 𝑨 hiding behind T? Is T(v)
always 𝑨𝒗?

The answer is yes! This is an approach to linear algebra that


doesn't start with matrices.

We still end up with matrices-after we choose an input basis


and output basis.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 55
Examples of Transformations
Note Transformations have a language of their own. For a
matrix, the column space contains all outputs 𝑨𝒗. The
nullspace contains all inputs for which 𝑨𝒗 = 𝟎. Translate
those words into "range" and "kernel":

Range of T = set of all outputs 𝑇(𝒗). Range corresponds to


column space.

Kernel of T = set of all inputs for which 𝑇(𝒗) = 0. Kernel


corresponds to nullspace.

The range is in the output space W. The kernel is in the


input space V. When T is multiplication by a matrix, 𝑇(𝒗) =
𝑨𝒗, range is column space and kernel is nullspace.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 56
Linear Transformations of the Plane
It is more interesting to see a transformation than to define
it. When a 2 by 2 matrix 𝑨 multiplies all vectors in ℝ2 , we
can watch how it acts.

Start with a "house" that has eleven endpoints. Those eleven


vectors 𝒗 are transformed into eleven vectors 𝑨𝒗. Straight
lines between 𝒗's become straight lines between the
transformed vectors 𝑨𝒗. (The transformation from house to
house is linear!)

Applying 𝑨 to a standard house produces a new house-


possibly stretched or rotated, etc.. The columns of 𝑯 are the
eleven comers of the first house. 𝑨 multiplies the 11 points
in the house matrix 𝑯 to produce the comers 𝑨𝑯 of the
other houses.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 57
Linear Transformations of the Plane
−6 −6 −7 0 7 6 6 −3 −3 0 0 −6
𝑯=
−7 2 1 8 1 2 −7 −7 −2 −2 −7 −7

Linear transformation of a house (applying different 𝑨’s)


Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 58
The matrix of a Linear
Transformation

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
The Matrix of a Linear Transformation
1. We know all 𝑇(𝒗) if we know 𝑇(𝒗1), … , 𝑇(𝒗𝑛 ) for an
input basis 𝒗1, … , 𝒗𝑛 : use linearity.
2. Column j in the "matrix for T" comes from applying T to
the input basis vector 𝒗𝑗 .
3. Write 𝑇 𝒗𝑗 = 𝑎1𝑗 𝒘1 … + 𝑎𝑚𝑗 𝒘𝑚 in the output basis of
𝒘's. Those 𝑎𝑖𝑗 into column j.
4. The matrix for 𝑇(𝒙) = 𝑨𝒙 is 𝑨 , if the input and output
bases = columns of 𝐼𝑛×𝑛 and 𝐼𝑚×𝑚 ·
5. When the bases change to 𝒗's and 𝒘's, the matrix for the
same T changes from 𝑨 to 𝑾−1 𝑨𝑽.
6. Best bases: 𝑽 = 𝑾 = eigenvectors and 𝑽, 𝑾 = singular
vectors give diagonal 𝜦 and 𝜮.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 60
Matrices for Linear Transformations
 Two representations of the linear transformation T:R3→R3 :

(1)T ( x1 , x2 , x3 )  (2 x1  x2  x3 , x1  3 x2  2 x3 ,3 x2  4 x3 )

 2 1  1   x1 
(2)T (x)  Ax   1 3  2  x2 
  
 0 3 4   x3 
 Reasons for matrix representation of a linear
transformation:
 It is simpler to write.

 It is simpler to read.
 It is more easily adapted for computer use.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 61
Matrices for Linear Transformations
 Thm: (Standard matrix for a linear transformation)
Let T : R n  R m be a linear transformation and {e1 , e2 ,..., en }
are the basis of R n such that
 a11   a12   a1n 
a  a  a 
T (e1 )    , T ( e2 )   22  ,
2 1
, T ( en )   2 n  ,
     
     
 m1 
a  m2 
a  mn 
a
Then the m  n matrix whose i columns correspond to T (ei )
 a11 a12 a1n 
a a a 
A  T (e1 ) T (e2 ) T (en )   21 22 2n 

 
 
 m1
a a m2 a mn 

is such that T (v)  Av for every v in R n .


A is called the standard matrix for T .
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 62
Matrices for Linear Transformations
Pf:  v1 
v 
v  R n  v   2   v1e1  v 2 e2   v n en
 
 
 vn 
T is a L.T.  T (v)  T (v1e1  v2e2   v nen )
 T (v1e1 )  T (v2e2 )   T ( v nen )
 v1T (e1 )  v2T (e2 )   vnT (en )

 a11 a12 a1n   v1   a11v1  a12v 2   a1nv n 


a a22 a2 n   v2   a21v1  a22 v2   a2 n v n 
Av   21 
    
    
 am 1 am 2 amn   vn   am 1v1  am 2 v2   amn vn 

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 63
Matrices for Linear Transformations
 a11   a12   a1n 
a  a  a 
 v1  21   v2  22    v n  2 n 
     
     
 m1 
a  m2 
a  mn 
a
 v1T (e1 )  v2T (e2 )   v nT (en )

Therefore, T ( v )  Av for each v in R n

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 64
Matrices for Linear Transformations
 Ex : (Finding the standard matrix of a linear transformation)

Find the standard matrix for the L.T. T : R 3  R 2 defined by


T ( x, y, z )  ( x  2 y, 2 x  y)
Sol:
Vector Notation Matrix Notation
1 
1 
T (e1 )  T (1, 0, 0)  (1, 2) T (e1 )  T ( 0 )   
  2
0 
0 
    2
T (e2 )  T (0, 1, 0)  (2, 1) T (e2 )  T ( 1 )   
  1
0 
0 
  0 
T (e3 )  T (0, 0, 1)  (0, 0) T (e3 )  T ( 0 )   
  0 
1 
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 65
Matrices for Linear Transformations
A  T (e1 ) T (e2 ) T (e3 )
1  2 0 

2 1 0
 Check:
 x  x
1  2 0    x  2 y 
A y    y 
  2 1 
0   2 x  y 
z z
i.e., T ( x, y, z )  ( x  2 y, 2 x  y )
 Note:
1  2 0  1x  2 y  0 z
A
2 1 0  2 x  1 y  0 z

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 66
The Matrix of a Linear Transformation
We will assign a matrix 𝑨 to every linear transformation T. For
ordinary column vectors, the input 𝒗 is in V = ℝ𝑛 and the
output 𝑇 (𝒗) is in W =ℝ𝑚 .

The matrix 𝑨 for this transformation will be m by n. Our


choice of bases in V and W will decide 𝑨.

The standard basis vectors for ℝ𝑛 and ℝ𝑚 are the columns


of I. That choice leads to a standard matrix. Then 𝑇(𝒗) =
𝑨𝒗 in the normal way.

But these spaces also have other bases, so the same


transformation T is represented by other matrices.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 67
The Matrix of a Linear Transformation
Choose the bases that give the best matrix (a diagonal
matrix) for 𝑇.

All vector spaces V and W have bases. Each choice of those


bases leads to a matrix for 𝑇.

When the input basis is different from the output basis, the
matrix for 𝑇(𝒗) = 𝒗 will not be the identity 𝑰. It will be the
"change of basis matrix".

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 68
The Matrix of a Linear Transformation
Suppose we know 𝑻(𝒗 ) for the input basis vectors 𝒗𝟏 to
𝒗𝒏 . Columns 1 to n of the matrix will contain those
outputs 𝑻(𝒗𝟏 ) to 𝑻 𝒗𝒏
𝑨 times 𝒄 = matrix times vector = combination of those n
columns.
𝑨𝒄 is the correct combination 𝑐1 𝑻 𝒗𝟏 + ⋯ + 𝑐𝑛 𝑻 𝒗𝒏 =
𝑻(𝒗).

Reason Every 𝒗 is a unique combination 𝑐1 𝒗1 + ⋯ . +𝑐𝑛 𝒗𝑛 of


the basis vectors 𝒗𝑗 .

Since T is a linear transformation (here is the moment for


linearity), 𝑇(𝒗) must be the same combination 𝑐1 𝑻 𝒗𝟏 +
⋯ + 𝑐𝑛 𝑻 𝒗𝒏 of the outputs 𝑻(𝒗𝒋 ) in the columns.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 69
The Matrix of a Linear Transformation
Example Suppose T transforms 𝒗1 = (1,0) to T(𝒗1 ) = (2, 3, 4).
Suppose the second basis vector 𝒗2 = (0,1) goes to 𝑇(𝒗2) =
(5,5,5).

If T is linear from ℝ2 to ℝ3 then its "standard matrix" is 3 by


2. Those outputs T(𝒗1 ) and T(𝒗2 ) go into the columns of 𝑨 :

2 5
𝑨 = 3 5 , 𝑐1 = 1 and 𝑐2 = 1 gives:
4 5
2 5 7
1
𝑇 𝒗1 + 𝒗2 = 3 5 = 8
1
4 5 9

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 70
Change of Basis

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
Change of Basis
Example Suppose the input space V = ℝ2 is also the output
space W = ℝ2 . Suppose that 𝑇(𝒗) = 𝒗 is the identity
transformation. You might expect its matrix to be 𝑰, but that
only happens when the input basis is the same as the
output basis. We will choose different bases to see how the
matrix is constructed.

For this special case 𝑇(𝒗) = 𝒗, I will call the matrix 𝑩


instead of 𝑨. We are just changing basis from the 𝒗's to the
𝒘's. Each 𝒗 is a combination of 𝒘1 and 𝒘2.
Change 𝒗1 = 1𝒘1 + 1𝒘2
Input Basis: 𝒗1 𝒗2 = 3 6 of basis: 𝒗2 = 2𝒘1 + 3𝒘2
3 8

Output Basis: 𝒘1 𝒘2 = 3 0
1 2
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 72
Change of Basis
We wrote the input basis 𝒗1, 𝒗2 in terms of the output
basi𝑠 𝒘1, 𝒘2.
We apply the identity transformation T to each input basis
vector: 𝑇(𝒗1) = 𝒗1 and 𝑇(𝒗2) = 𝒗2. Then we write those
outputs 𝒗1 and 𝒗2 in the output basis 𝒘1 and 𝒘2. Those
bold numbers 1, 1 and 2, 3 tell us column 1 and
column 2 of the matrix 𝑩 (the change of basis matrix):
𝑾 𝑩 = 𝑽 so 𝑩 = 𝑾−1 𝑽.
Matrix B for 𝒘𝟏 𝒘𝟐 𝑩 = 𝒗𝟏 𝒗𝟐 𝒊𝒔
𝟑 𝟎 𝟏 𝟐 𝟑 𝟔
change of basis =
𝟏 𝟐 𝟏 𝟑 𝟑 𝟖
When the input basis is in the columns of a matrix V, and
the output basis is in the columns of W, the change of basis
matrix for 𝑻 = 𝑰 is 𝑩 = 𝑾−1 𝑽.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 73
Change of Basis
A clear way to understand 𝑩 = 𝑊 −1 𝑽. Suppose the same
vector u is written in the input basis of 𝒗’s and the output
basis of w’s.
𝒖 = 𝑐1 𝒗1 + ⋯ . +𝑐𝑛 𝒗𝑛
𝒖 = 𝑑1 𝒘1 + ⋯ . +𝑑𝑛 𝒘𝑛

𝑐1 𝑑1
𝒗1 … 𝒗𝑛 … = 𝒘1 … 𝒘𝑛 …
𝑐𝑛 𝑑𝑛

𝑽𝒄 = 𝑾𝒅 or 𝒅 = 𝑾−1 𝑽𝒄 and thus 𝑩 = 𝑾−1 𝑽

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 74
Change of Basis
The formula 𝑩 = 𝑾−1 𝑽 produces one of the world 's
greatest mysteries:

When the standard basis 𝑽 = 𝑰 is changed to a different


basis W, the change of basis matrix is not W but 𝑩 = 𝑾−𝟏 .

Larger basis vectors have smaller coefficients!

𝑥 −1
𝑥
𝒘 𝒘2
𝑦 in the standard basis has coefficients 1 𝑦 in
the 𝒘1 , 𝒘2 basis.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 75
Construction of the Matrix
Now we construct a matrix for any linear transformation.
Suppose T transforms the space V ( n-dimensional) to the
space W ( m-dimensional).
We choose a basis 𝒗1 , … , 𝒗𝑛 for V and we choose a basis
𝒘1 , … , 𝒘𝑚 for W. The matrix A will be m by n.
To find the first column of A, apply T to the first basis
vector 𝒗1 . The output 𝑇 𝒗1 is in W.
𝑇(𝒗1 ) is a combination 𝑎11 𝒘𝟏 + ⋯ + 𝑎𝑚1 𝒘𝒎 of the output
basis for W.
𝑎11 , … , 𝑎𝑚1 go into the first column of 𝑨. Transforming 𝒗1 to
𝑇(𝒗1 ) matches multiplying (1, 0, … , 0) by 𝑨. It yields that 1st
column of the matrix.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 76
Construction of the Matrix
When T is the derivative and the first basis vector is 1, its
derivative is 𝑇(𝒗1 ) = 0. So for the derivative matrix below,
the first column of A is all zero.

Example 3 The input basis of v's is 1, x, x2 , x3 . The output


basis of w's is 1, x, x2 .
𝒅𝒗
Then T takes the derivative: 𝑻 𝒗 = and A "derivative
𝒅𝒙
𝑑𝑣
matrix". If 𝑣 = 𝑐1 + 𝑐2 𝑥 1 + 2 3
𝑐3 𝑥 + 𝑐4 𝑥 , = 1𝑐2 + 2𝑐3 𝑥 +
𝑑𝑥
3𝑐4 𝑥 2 and we can write:
𝑐1
0 1 0 0 𝑐 𝑐2
2
𝐴𝑐 = 0 0 2 0 𝑐 = 2𝑐3
3
0 0 0 3 𝑐 3𝑐4
4

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 77
Construction of the Matrix
Key rule: The jth column of A is found by applying T to the
jth basis vector 𝑣𝑗
𝑇(𝑣𝑗 ) = combination of output basis vectors= 𝒂𝟏𝒋 𝒘𝟏 + ⋯ +
𝒂𝒎𝒋 𝒘𝒎 .
These numbers 𝑎𝑖𝑗 go into A. The matrix is constructed to get
the basis vectors right. Then linearity gets all other vectors
right. Every v is a combination 𝑐1 𝑣1 + ⋯ + 𝑐𝑛 𝑣𝑛 , and T (v) is
a combination of the w 's. When A multiplies the vector c =
(𝑐1 , . . ., 𝑐𝑛 ) in the v combination, Ac produces the
coefficients in the T( v) combination. This is because matrix
multiplication (combining columns) is linear like T.

The matrix A tells what T does. Every linear transformation from


V to W can be converted to a matrix. The matrix depends on the
bases.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 78
Construction of the Matrix
Example 4 For the integral 𝑇 + ( 𝑣 ), the first basis function is
again 1. Its integral is the second basis function x. So the
first column of the "integral matrix" A+ is (0, 1, 0, 0).

1 1
The integral of 𝑑1 + 𝑑2 𝑥 + 𝑑3 𝑥 2 is 𝑑1 𝑥 + 𝑑2 𝑥 2 + 𝑑3 𝑥 3
2 3
0
0 0 0 𝑑2
𝑑1
1 0 0 1
𝐴+ 𝑑 = 𝑑2 = 𝑑2
0 1Τ2 0 2
𝑑3
0 0 1Τ3 1
𝑑
3 3

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 79
Construction of the Matrix
If you integrate a function and then differentiate, you get
back to the start. So AA+ = I.
But if you differentiate before integrating, the constant term
is lost. So 𝑨+ 𝑨 is not 𝑰.
The integral of the derivative of l is zero:
𝑇 + 𝑇 1 =integral of zero function = 0.
This matches A+ A, whose first column is all zero. The
derivative T has a kernel ( constant functions). Its matrix A
has a nullspace. Main idea again: Av copies T( v ).

The examples of derivative and integral made three points.


First, linear transformations T are everywhere.
Second, spaces other than Rn are important-we had
functions in V and W. Third, if we differentiate and then
integrate, we can multiply their matrices A+ A.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 80
Change of Bases
 The matrix of T relative to the bases B and B'

T :V  W (a L.T.)
B  {v1 , v2 , , vn } (a basis for V )
B '  { w1 , w2 , , wm } (a basis for W )

Thus, the matrix of T relative to the bases B and B' is

A  T (v1 )B ' , T (v 2 )B ' , , T ( v n )B '   M mn

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 81
Change of Bases
 Transformation matrix for nonstandard bases

Let V and W be finite - dimensional vector spaces with basis


B and B ', respectively, where B  {v1 , v 2 , , vn }
If T : V  W is a L.T. such that

 a11   a12   a1n 


a  a  a 
T (v1 )B '    , T ( v2 )B '  
22 
T ( vn )B '  
21 2n 
, ,
     
     
 am 1   am 2   amn 

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 82
Change of Bases
The m  n matrix whose i columns correspond to T (vi )B ' is

 a11 a12 a1n 


a a22 a2 n 
A  T (v1 ) T (v 2 ) T (v n )   21
 
 
 am 1 am 2 amn 

such that T (v) B '  A[v]B for every v in V.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 83
Change of Bases
 Ex : (Finding a transformation matrix relative to nonstandard
bases)
Let T:R 2  R 2 be a L.T. defined by
T ( x1 , x2 )  ( x1  x2 , 2 x1  x2 )
Find the matrix of T relative to the basis
B  {(1, 2), (1, 1)} and B'  {(1, 0), (0, 1)}
Sol:
T (1, 2)  (3, 0)  3(1, 0)  0(0, 1)
T (1, 1)  (0,  3)  0(1, 0)  3(0, 1)
 3 0
T (1, 2)B '   0 , T ( 1, 1)B '   3
   
the transformation matrix T relative to B and B '
3 0 
A  T (1, 2)B ' T ( 1, 1)B '    
 0  3 
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 84
Change of Bases
Now use the matrix A to find T (v), where v  (2, 1)

v  (2, 1)  1(1, 2)  1(1, 1) B  {(1, 2), (1, 1)}

1
 v B   
 1
3 0   1  3
 T ( v )B '  Av B      
 0  3 
   3
1

 T ( v)  3(1, 0)  3(0, 1)  (3, 3) B' {(1, 0), (0, 1)}

 Check: T (2, 1)  (2  1, 2(2)  1)  (3, 3)

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 85
Change of Bases
 Notes:

(1) In the special case where V  W and B  B ',


the matrix A is called the matrix of T relative to the basis B
(2) T : V  V : the identity transformation
B  {v1 , v 2 , , v n } : a basis for V
 the matrix of T relative to the basis B
1 0 0
0 1 0 
A  T (v1 )B , T (v 2 )B , , T (v n )B     In
 
 
0 0 1

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 86
Matrix Products AB match
transformations TS

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
Matrix Products AB Match Transformations TS
Two linear transformations T and S are represented by two
matrices A and B. Now compare 𝑇𝑆 with the multiplication
𝑨𝑩:

When we apply the transformation T to the output from S,


we get 𝑇𝑆 by this rule: (𝑇𝑆)( 𝒖) is defined to be 𝑇(𝑆( 𝒖)). The
output 𝑆( 𝒖) becomes the input to T.

When we apply the matrix 𝑨 to the output from 𝑩, we


multiply 𝑨𝑩 by this rule: (𝑨𝑩)(𝒙) is defined to be 𝑨(𝑩𝒙 ).
The output Bx becomes the input to A.

Matrix multiplication gives the correct matrix AB to


represent TS.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 88
Matrix Products AB Match Transformations TS
The transformation 𝑆 is from a space U to V.

Its matrix 𝑩 uses a basis 𝒖1 , … , 𝒖𝑝 for U and a basis


𝒗1 , … , 𝒗𝑛 𝑓𝑜𝑟 V.

The transformation T is from V to W as before. Its matrix 𝑨


must use the same basis 𝒗1 , … , 𝒗𝑛 for V – this is the output
space for S and the input space for 𝑇.

Then the matrix 𝑨𝑩 matches 𝑇𝑆.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 89
Matrix Products AB Match Transformations TS
Multiplication The linear transformation 𝑇𝑆 starts with any
vector 𝒖 in U, goes 𝑆(𝒖) in V and then to 𝑇(𝑆(𝒖)) in W.

The matrix 𝑨𝑩 starts with any 𝒙 in ℝ𝑝 , goes to 𝑩𝒙 in ℝ𝑛 and


then to 𝑨𝑩𝒙 in ℝ𝑚 . The matrix AB correctly represents TS:

𝑇𝑆: 𝑈 → 𝑉 → 𝑊 , 𝐴𝐵: (𝑚 𝑏𝑦 𝑛)(𝑛 𝑏𝑦 𝑝) = (𝑚 𝑏𝑦 𝑝).

The input is 𝒖 = 𝑥1 𝒖1 + ⋯ + 𝑥𝑝 𝒖𝑝 . The output 𝑇(𝑆(𝒖))


matches the output 𝑨𝑩𝒙.
Product of transformations 𝑇𝑆 matches product of matrices 𝑨𝑩.

The most important cases are when U,V,W are the same and their
bases are the same. With m=n=p, we have square matrices that we
can multiply.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 90
Matrix Products AB Match Transformations TS
Example 𝑆 rotates by the angle 𝜃 and 𝑇 rotates by −𝜃.

Then 𝑇𝑆 = 𝐼 leads to AB = I. For the matrices to match


𝑨𝒃𝒙 must be 𝒙. The two matrices are inverses.

Check this by putting cos −𝜃 = 𝑐𝑜𝑠𝜃 and sin( −𝜃) =


− sin 𝜃 into the backward rotation matrix 𝑨:

𝑐𝑜𝑠𝜃 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃


𝑨𝑩 = =
−𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃

𝑐𝑜𝑠 2 𝜃 + 𝑠𝑖𝑛2 𝜃 0 =𝑰
2 2
0 𝑐𝑜𝑠 𝜃 + 𝑠𝑖𝑛 𝜃

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 91
Composition of Linear Transformations
 Composition of T1: Rn→Rm with T2: Rm→Rp :

T ( v )  T2 (T1 ( v )), v  R n

T  T2 T1 , domain of T  domain of T1

 Thm: (Composition of linear transformations)


Let T1 : R n  R m and T2 : R m  R p be L.T.
with standard matrices A1 and A2 , then
(1) The composition T : R n  R p , defined by T (v)  T2 (T1 (v)),
is a L.T.
(2) The standard matrix A for T is given by the matrix
product A  A2 A1
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 92
Composition of Linear Transformations
Pf:

(1) ( T is a L.T.)
Let u and v be vectors in R n and let c be any scalar then
T (u  v)  T2 (T1 (u  v))  T2 (T1 (u)  T1 ( v))
 T2 (T1 (u))  T2 (T1 ( v))  T (u)  T ( v)
T (cv)  T2 (T1 (cv))  T2 (cT1 ( v))  cT2 (T1 ( v))  cT ( v)

(2) ( A2 A1 is the standard matrix for T )

T ( v)  T2 (T1 ( v))  T2 ( A1 v)  A2 A1 v  ( A2 A1 ) v
 But note:
T1 T2  T2 T1

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 93
Composition of Linear Transformations
 Ex : (The standard matrix of a composition)
Let T1 and T2 be L.T. from R 3 into R 3 such that
T1 ( x, y, z )  (2 x  y, 0, x  z )
T2 ( x, y, z )  ( x  y, z, y )
Find the standard matrices for the compositions
T  T2  T1 and T '  T1  T2 ,
Sol:
 2 1 0
A1  0 0 0 (standard matrix for T1 )
1 0 1
1  1 0
A2  0 0 1 (standard matrix for T2 )
0 1 0
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 94
Composition of Linear Transformations
The standard matrix for T  T2 T1

1  1 0   2 1 0   2 1 0 
A  A2 A1  0 0 1 0 0 0  1 0 1
    
 0 1 0  1 0 1   0 0 0 
The standard matrix for T '  T1 T2

2 1 0 1  1 0 2  2 1
A'  A1 A2  0 0 0 0 0 1  0 0 0
1 0 1 0 1 0 1 0 0

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 95
Inverse Linear Transformation
 Inverse linear transformation

If T1 : R n  R n and T2 : R n  R n are L.T. such that


for every v in R n
T2 (T1 ( v ))  v and T1 (T2 ( v ))  v

Then T2 is called the inverse of T1 and T1 is said to be invertible

 Note:
If the transformation T is invertible, then the inverse
is unique and denoted by T–1 .

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 96
Inverse Linear Transformation
 Existence of an inverse transformation
Let T : R n  R n be a L.T. with standard matrix A,
Then the following condition are equivalent.

(1) T is invertible.
(2) T is an isomorphism.
(3) A is invertible.
 Note:
If T is invertible with standard matrix A, then the
standard matrix for T–1 is A–1 .

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 97
Inverse Linear Transformations
 Ex : (Finding the inverse of a linear transformation)

The L.T. T : R 3  R 3 is defined by


T ( x1 , x2 , x3 )  (2 x1  3 x2  x3 , 3 x1  3 x2  x3 , 2 x1  4 x 2  x 3 )
Show that T is invertible, and find its inverse.
Sol: The standard matrix for T
2 3 1  2 x1  3 x2  x3
A  3 3 1  3 x1  3 x2  x3
2 4 1  2 x1  4 x2  x3
 2 3 1 1 0 0  1 0 0 1 1 0
  G . J .
E    I A1 
 A I 3    3 3 1 0 1 0    0 1 0  1 0 1  
 2 4 1 0 0 1   0 0 1 6 2 3 

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 98
Inverse Linear Transformations
Therefore T is invertible and the standard matrix for T 1 is A1
 1 1 0
A1   1 0 1 
 6 2 3 

 1 1 0   x1    x1  x2 
   
T 1 (v)  A1 v   1 0 1   x2     x1  x3 
 6 2 3   x3   6 x1  2 x2  3 x3 

In other words,
T 1 ( x1 , x2 , x3 )  (  x1  x2 ,  x1  x3 , 6 x1  2 x2  3 x3 )

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 99
Choosing the best bases

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
Choosing the Best Bases
Choose bases that diagonalize the matrix 𝑨.

With the standard basis (the columns of I) our


transformation 𝑇 produces some matrix 𝑨 – probably not
diagonal. That same 𝑇 is represented by different matrices
when we choose different bases. The two great choices are
eigenvectors and singular vectors.

Eigenvectors If 𝑇 transforms ℝ𝑛 to ℝ𝑛 , its matrix 𝑨 is


square. But using the standard basis, the matrix 𝑨 is
probably not diagonal.

If there n independent eigenvectors, choose those as the input


and output basis. In this good basis, the matrix for 𝑇 is the
diagonal eigenvalue matrix 𝑨.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 101
Choosing the Best Bases
Example The projection matrix 𝑇 projects every 𝒗 = (𝑥, 𝑦)
in ℝ2 onto the line 𝑦 = −𝑥. Using the standard basis, 𝒗1 =
(1,0) projects to 𝑇(𝒗1 ) = (½, −½). For 𝒗2 = (0, 1) the
projection is 𝑇(𝒗2 ) = (-½,½)

Those are the columns of 𝑨:


1 1

𝐴= 2 2
1 1

2 2

has 𝑨𝑇 = 𝑨 and 𝑨2 = 𝑨.

Now comes the main point of eigenvectors. Make them the


basis vectors ! Diagonalize !
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 102
Choosing the Best Bases
When the basis vectors are eigenvectors, the matrix
becomes diagonal.

𝒗1 = 𝒘1 = (1, −1) projects to itself: 𝑇(𝒗1 ) = 𝒗1 and 𝜆1 = 1


𝒗2 = 𝒘2 = (1, 1) projects to zero : 𝑇(𝒗2 ) = 0 and 𝜆2 = 0

Eigenvector bases 𝑇ℎ𝑒 𝑛𝑒𝑤 𝑚𝑎𝑡𝑟𝑖𝑥 𝑖𝑠: 1 0 = 𝜆1 0 = 𝜦


Diagonal matrix 0 0 0 𝜆2

Eigenvectors are the perfect basis vectors. They produce the


eigenvalue matrix 𝚲.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 103
Choosing the Best Bases
What about other choices of input basis = output basis? Put
those basis vectors into the columns of 𝑩. We saw above
that the change of basis matrices (between standard basis
and new basis) are 𝑩𝑖𝑛 = 𝑩 and 𝑩𝑜𝑢𝑡 = 𝑩−1 . The new
matrix for 𝑇 is similar to 𝑨:

𝑨𝒏𝒆𝒘 = 𝑩−𝟏 𝑨𝑩 in the new basis of b's is similar to A in the


standard basis:

𝑨𝑏′𝑠 𝑡𝑜 𝑏′𝑠 = 𝑩−1 standard to b′s 𝑨𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑩b′s to standard

I used the multiplication rule for the transformation 𝐼𝑇 𝐼.


The matrices for 𝐼, 𝑇, 𝐼 were 𝑩−1 , 𝑨, 𝑩. The matrix 𝑩 contains
the input vectors 𝒃 in the standard basis.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 104
Choosing the Best Bases
Finally we allow different spaces V and W, and different bases
𝒗's and 𝒘's. When we know 𝑇 and we choose bases, we get
a matrix 𝑨. Probably 𝑨 is not symmetric or even square. But
we can always choose 𝒗's and 𝒘's that produce a diagonal
matrix. This will be the singular value matrix Σ =
𝑑𝑖𝑎𝑔 𝜎1 , … , 𝜎𝑛 in the decomposition 𝑨 = 𝑼𝜮𝑽𝑇 .

Singular vectors The SVD says that 𝑼−1 𝑨𝑽 = 𝜮. The right


singular vectors 𝒗1 , … , 𝒗𝑛 will be the input basis. The left
singular vectors 𝒖1 , … , 𝒖𝑚 will be the output basis. The
matrix for the same transformation in these new bases is
−1
𝑩𝑜𝑢𝑡 𝑨𝑩𝑖𝑛 = 𝑼−1 𝑨𝑽 = 𝜮

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 105
Choosing the Best Bases
−1
𝑩𝑜𝑢𝑡 𝑨𝑩𝑖𝑛 = 𝑼−1 𝑨𝑽 = 𝜮

I can't say that 𝚺 is "similar" to 𝑨. We are working now with


two bases, input and output. But those are orthonormal bases
and they preserve the lengths of vectors. We say: Σ is
"isometric" to A.

Definition 𝑪 = 𝑸1−1 𝑨𝑸 is isometric to A if 𝑸1 and 𝑸2 are


orthogonal.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 106
Choosing the Best Bases
Example To construct the matrix 𝑨 for the transformation
𝑇 = 𝑑/𝑑𝑥, we chose the input basis 1, 𝑥, 𝑥 2 , 𝑥 3 and the
output basis 1, 𝑥, 𝑥 2 .
The matrix 𝑨 was simple but wasn't diagonal. But we can
take each basis in the opposite order. Now the input basis is
𝑥 3 , 𝑥 2 , 𝑥, 1 and the output basis is 𝑥 2 , 𝑥, 1. The change of
basis matrices 𝑩𝑖𝑛 and 𝑩𝑜𝑢𝑡 are permutations. The matrix
for 𝑇(𝒖) = du/dx with the new bases is the diagonal singular
−𝟏
value matrix 𝑩𝒐𝒖𝒕 𝑨𝑩𝒊𝒏 = 𝚺 with 𝜎’s=3,2,1:
1
1 0 1 0 0 3 0 0 0
𝑩−1 1
𝑜𝑢𝑡 𝑨𝑩𝑖𝑛 = 1 0 0 2 0 = 0 2 0 0
1
1 0 0 0 3 0 0 1 0
1
We found that 𝑥 3 , 𝑥 2 , 𝑥, 1 have derivatives 𝟑𝒙𝟐 , 𝟐𝒙, 𝟏, 𝟎

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 107
Summary
1. If we know 𝑇 𝒗1 , … , 𝑇(𝒗𝑛 ) for a basis, linearity will
determine all other 𝑇(𝒗).
𝐿𝑖𝑛𝑒𝑎𝑟 𝑡𝑟𝑎𝑛𝑠𝑓𝑜𝑟𝑚𝑎𝑡𝑖𝑜𝑛 𝑇 𝑀𝑎𝑡𝑟𝑖𝑥 𝑨 𝑚 × 𝑛
2. 𝐼𝑛𝑝𝑢𝑡 𝐵𝑎𝑠𝑖𝑠 𝒗1 , . . . , 𝒗𝑛 ⇒ Re𝑝𝑟𝑒𝑠𝑒𝑛𝑡𝑠 𝑇
𝑂𝑢𝑡𝑝𝑢𝑡 𝐵𝑎𝑠𝑖𝑠 𝒘1 , . . . , 𝒘𝑚 𝑖𝑛 𝑡ℎ𝑒𝑠𝑒 𝑏𝑎𝑠𝑒𝑠
3. The change of basis matrix 𝑩 = 𝑾−1 𝑽 =
−1
𝑩𝑜𝑢𝑡 𝑩𝑖𝑛 represents the identity 𝑇(𝒗) = 𝒗.
4. If 𝑨 and 𝑩 represent 𝑇 and 𝑆, and the output basis for 𝑆 is
the input basis for 𝑇, then the matrix 𝑨𝑩 represents the
transformation 𝑇 ( 𝑆 ( 𝒖)).
5. The best input-output bases are eigenvectors and/or
singular vectors of A. Then
𝑩−1 𝑨𝑩 = 𝜦= eigenvalues 𝑩−1
𝑜𝑢𝑡 𝑨𝑩𝑖𝑛 =𝚺=singular values

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 108
Transition Matrices and Similarity
T :V  V ( a L.T.)
B  {v1 , v 2 , , vn } (a basis of V )
B '  { w1 , w2 , , wn } (a basis of V )
A  T (v1 )B , T (v 2 )B , , T (v n )B  (matrix of T relative to B )
A '  T ( w1 )B ' , T ( w2 )B ' , , T ( wn )B '  (matrix of T rel. to B ' )
P   w1 B ,  w2 B , ,  wn B  (transition matrix from B ' to B )
P 1  v1 B ' , v 2 B ' , , v n B '  (transition matrix from B to B ' )

  v B  P  v B ' ,  v B '  P 1  v B
T (v)B  A  v B
T (v)B '  A ' v B '
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 109
Transition Matrices and Similarity
 Two ways to get from vB ' to T ( v)B: '
(1) direct indirect
A '[v]B '  [T (v)]B '

(2) indirect
P 1 AP[v]B '  [T (v)]B '

 A 'B '  P 1B ' B AB PBB '

direct

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 110
Transition Matrices and Similarity
 Ex Find the transformation matrix A' for T : R 2  R 2

with T ( x1 , x2 )  (2 x1  2 x2 ,  x1  3 x2 )

relative to the basis B '  {(1, 0), (1, 1)}

Sol:
(I) A '  T (1, 0) B ' T (1, 1)B ' 
3
T (1, 0)  (2,  1)  3(1, 0)  1(1, 1)  T (1, 0)B '   
  1
 2 
T (1, 1)  (0, 2)  2(1, 0)  2(1, 1)  T (1, 1)B '   
2
 3 2 
 A '  T (1, 0)B ' T (1, 1)B '    
  1 2 
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 111
Transition Matrices and Similarity
(II) Standard matrix for T (i.e., the transformation
matrix of T relative to B  {(1, 0), (0, 1)})
 2  2 with T ( x , x )  (2 x  2 x ,  x  3x )
A  T (1, 0) T (0, 1)   

1 2 1 2 1 2
 1 3 
The transition matrix from B ' to B :
 1 1
P   (1, 0) B (1, 1)B    0 1

 
1  1  1
The transition matrix from B to B ' : P  
 0 1 

The transformation matrix of T relative B '{(1, 0),(1,1)}


1  1  1  2  2   1 1  3  2 
A '  P AP         
 0 1   1 3  0 1    1 2 

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 112
Transition Matrices and Similarity
(2) standard matrix for T (matrix of T relative to
B  {(1, 0), (0, 1)})
 2  2
A  T (1, 0) T (0, 1)  
 1 3 
transition matrix from B ' to B
※ Solve a(1, 0) + b(0, 1) = (1, 0) 
1 1
P   (1, 0) B  (1, 1) B    
(a, b) = (1, 0)
※ Solve c(1, 0) + d(0, 1) = (1, 1) 
 0 1 (c, d) = (1, 1)
transition matrix from B to B '
1 1 ※ Solve a(1, 0) + b(1, 1) = (1, 0) 
P   (1, 0) B '  (0, 1) B '   
1
 (a, b) = (1, 0)
※ Solve c(1, 0) + d(1, 1) = (0, 1) 
 0 1  (c, d) = (-1, 1)
matrix of T relative B '
11  1  2  2 1 1  3  2
A'  P AP         
 0 1   1 3  0 1   1 2 
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 113
Transition Matrices and Similarity
 Ex: (Finding a matrix for a linear transformation)
Let B  {(3, 2), (4,  2)} and B '  {( 1, 2), (2,  2)} be basis for
 2 7 
R , and let A  
2
 be the matrix for T : R 2
 R 2
relative to B.
 3 7 
Find the matrix of T relative to B '
Sol: Because the specific function is unknown, it is difficult to
apply the direct method to derive A’, so we resort to the
indirect method where A’ = P-1AP
 3  2
transition matrix from B' to B : P  (1, 2)B (2,  2)B    
 2  1 
  1 2
transition matrix from B to B' : P  (3, 2)B ' (4,  2)B '   
1

  2 3 
matrix of T relative to B':
 1 2  2 7 3  2  2 1

A' P AP  
1 
   
 2 3   3 7 2 1 1 3
     

6.11
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 114
4
Transition Matrices and Similarity
 Ex: (Finding a matrix for a linear transformation)
 2 7 
For the linear transformation below T : R  R , A   2
 , 2

 3 7 
find  v B , T ( v ) B , and T ( v) B ' , for the vector v whose
 3
coordinate matrix is  v B '  
Sol: v B  Pv B '  
3  2  3  7   1
2  1    1    5
 2 7   7   21
T ( v)B  Av B       
  3 7 
  5  14 
T ( v)B '  P 1 T ( v)B   12 23  14
21  7 
  
   0
 2 1  3  7
or T ( v)B '  A' v B '      
 1 3   1  0 
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 115 6.11
5
Transition Matrices and Similarity
 Similar matrix:
For square A and A‘ of order n, A‘ is said to be similar to A
if there exist an invertible matrix P such that A '  P 1 AP
Thm: (Properties of similar matrices)
Let A, B, and C be square matrices of order n.
Then the following properties are true.
(1) A is similar to A.
(2) If A is similar to B, then B is similar to A.
(3) If A is similar to B and B is similar to C, then A
is similar to C.
Pf:
(1) A  I n AI n
(2) A  P 1 BP  PAP 1  P( P 1 BP) P 1
PAP 1  B  Q 1 AQ  B (Q  P 1 )
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 116
Similar Matrices
 Ex : (Similar matrices)

 2 2   3 2 
(a) A    and A '    are similar
 1 3   1 2 
1 1 1
because A'  P AP, where P   
 0 1

 2 7   2 1
(b) A    and A '    are similar
 3 7   1 3
1  3  2
because A'  P AP, where P   
 2  1 

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 117
Transition Matrices and Similarity
 Ex : (A comparison of two matrices for a linear transformation)
1 3 0 
Suppose A   3 1 0  is the matrix for T : R 3  R 3
 0 0 2 
relative to the standard basis B.
Find the matrix for T relative to the basis
Sol:
B'  {(1, 1, 0), (1,  1, 0), (0, 0, 1)}
The transition matrix P from B' to the standard basis B is
1 1 0
P   (1, 1, 0) B (1,  1, 0) B (0, 0, 1)B   1 1 0 
 12 12 0  0 0 1 
 
 P 1   12  12 0
 0 0 1 
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 118
Transition Matrices and Similarity
The matrix of T relative to B ' :
 12 12 0  1 3 0  1 1 0
   3 1 0   1 1 0 
A '  P 1 AP   12  12 0     
 0 0 1   0 0 2  B  0 0 1  B ' B
B B ' 

4 0 0
  0 2 0   diagonal matrix
 0 0 2 

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 119
Transition Matrices and Similarity
 Notes: Diagonal matrices have many computational
advantages over nondiagonal ones
 d1 0 0
0 d2 0 
for D  
 
 
0 0 dn 

 d1k 0 0
 
0 d 2k 0 (2) DT  D
(1) D k  
 
 k
 0 0 d n   d11 0 0
 
0 0
1
1
(3) D    , di  0
d2

 
0 0 1 
 dn 

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 120
The search for a good basis

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
The Search for a Good Basis
1. With a new input basis 𝑩𝑖𝑛 and output basis 𝑩𝑜𝑢𝑡 , every
−1
matrix A becomes 𝑩𝑜𝑢𝑡 𝑨𝑩𝑖𝑛 .

2. 𝑩𝑖𝑛 = 𝑩𝑜𝑢𝑡 = "generalized eigenvectors of A" produces


the Jordan form 𝑱 = 𝑩−𝟏 𝑨𝑩.

3. The Fourier matrix F= 𝑩𝑖𝑛 = 𝑩𝑜𝑢𝑡 diagonalizes every


circulant matrix (use the FFT).

4. Sines and cosines, Legendre and Chebyshev: those are


great bases for function spaces.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 122
The Search for a Good Basis
The input basis vectors will be the columns of 𝑩𝑖𝑛 The
output basis vectors will be the columns of 𝑩𝑜𝑢𝑡 . Always
𝑩𝑖𝑛 and 𝑩𝑜𝑢𝑡 are invertible-basis vectors are independent!

Pure algebra If 𝑨 is the matrix for a transformation 𝑇 in the


standard basis, then 𝑩−1
𝑜𝑢𝑡 𝑨𝑩𝑖𝑛 is the matrix in the new
bases.

The standard basis vectors are the columns of the identity:


𝑩𝑖𝑛 = 𝑰𝑛×𝑛 and 𝑩𝑜𝑢𝑡 = 𝑰𝑚×𝑚 ·

Now we are choosing special bases to make the matrix


clearer and simpler than 𝑨.

When 𝑩𝑖𝑛 = 𝑩𝑜𝑢𝑡 = B, the square matrix 𝑩−1 𝑨𝑩 is similar to A.


Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 123
The Search for a Good Basis
1 𝑩𝑖𝑛 = 𝑩𝑜𝑢𝑡 = eigenvector matrix X. Then 𝑿−1 𝑨𝑿 =
eigenvalues in 𝑨.
This choice requires 𝑨 to be a square matrix with n
independent eigenvectors.
"A must be diagonalizable." We get 𝜦 when 𝑩𝑖𝑛 = 𝑩𝑜𝑢𝑡
is the eigenvector matrix 𝑿.

2 𝑩𝑖𝑛 = 𝑽, 𝑩𝑜𝑢𝑡 = 𝑼 singular vectors of A. Then 𝑼−1 𝑨𝑽 =


diagonal 𝜮.
𝜮 is the singular value matrix (with 𝜎1 , … , 𝜎𝑟 on its diagonal)
when 𝑩𝑖𝑛 and 𝑩𝑜𝑢𝑡 are the singular vector matrices 𝑽 and
𝑼. Recall that those columns of 𝑩𝑖𝑛 and 𝑩𝑜𝑢𝑡 are
orthonormal eigenvectors of 𝑨𝑇 𝑨 and 𝑨𝑨𝑇 . Then 𝑨 = 𝑼𝜮𝑉 𝑇
gives 𝜮 = 𝑼−1 𝑨𝑽.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 124
The Search for a Good Basis
3 𝑩𝑖𝑛 = 𝑩𝑜𝑢𝑡 = generalized eigenvectors of 𝑨. Then 𝑩−1 𝑨𝑩=
Jordan form J.

𝑨 is a square matrix but it may only have s independent


eigenvectors. (If 𝑠 = 𝑛 then 𝑩 is 𝑿 and 𝑱 is 𝜦.) In all cases
Jordan constructed 𝑛 − 𝑠 additional " generalized“
eigenvectors, aiming to make the Jordan form 𝑱 as diagonal
as possible :

i) There are s square blocks along the diagonal of J.


ii) Each block has one eigenvalue 𝜆, one eigenvector, and 1
's above the diagonal.
The good case has 𝑛 1 × 1 blocks, each containing an
eigenvalue. Then 𝑱 is 𝜦 ( diagonal).

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 125
The Search for a Good Basis
Example This Jordan matrix 𝑱 has eigenvalues 𝜆 = 2, 2, 3, 3
(two double eigenvalues).
Those eigenvalues lie along the diagonal because 𝑱 is
triangular. There are two independent eigenvectors for 𝜆 =
2, but there is only one line of eigenvectors for 𝜆 = 3. This will
be true for every matrix 𝑪 = 𝑩𝑱𝑩−1 that is similar to 𝑱.
2
Jordan matrix: 𝑱 = 2
3 1
0 3
Two eigenvectors for 𝜆 = 2 are 𝒙1 = 1,0,0,0 , 𝒙2 = 0,1,0,0 .
One eigenvector for 𝜆 = 3 is 𝒙3 = 0,0,1,0 . The generalized
eigenvector for this Jordan matrix is the 4th standard basis
vector 𝒙4 = 0,0,0,1 . The eigenvectors for 𝑱 (normal & gene-
ralized) are the columns 𝒙1 , 𝒙2 , 𝒙3 , 𝒙4 of the identity 𝑰.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 126
The Search for a Good Basis
Notice 𝑱 − 3𝑰 𝒙4 = 𝒙3 . The generalized eigenvector 𝒙4
connects to the true eigenvector 𝒙3 . A true 𝒙4 would have
𝑱 − 3𝑰 𝒙4 = 𝟎, but that doesn't happen here.
Every matrix 𝑪 = 𝑩𝑱𝑩−1 that is similar to this J will have
true eigenvectors 𝒃1 , 𝒃2 , 𝒃3 in the first three columns of 𝑩.
The fourth column of 𝑩 will be a generalized eigenvector 𝒃4
of 𝑪, tied to the true 𝒃3 . Here is a quick proof that uses
𝑩𝒙3 = 𝒃3 and 𝑩𝒙4 = 𝒃4 to show: The fourth column 𝒃4 is
tied to 𝒃3 by 𝑪 − 3𝑰 𝒃4 = 𝒃3 .
𝑩𝑱𝑩−𝟏 − 3𝑰 𝒃𝟒 = 𝑩𝑱𝒙𝟒 − 3𝑩𝒙𝟒 = 𝑩 𝑱 − 3𝑰 𝒙𝟒 = 𝑩𝒙𝟑 = 𝒃𝟑
The point of Jordan's theorem is that every square matrix 𝑨
has a complete set of eigenvectors and generalized
eigenvectors. When those go into the columns of 𝑩, the
matrix 𝑩−1 𝑨𝑩 = 𝑱 is in Jordan form.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 127
The Jordan Form

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
Jordan Form
For every 𝑨, we want to choose 𝑩 so that 𝑩−1 𝑨𝑩 is as nearly
diagonal as possible. When 𝑨 has a full set of n
eigenvectors, they go into the columns of 𝑩. Then 𝑩 = 𝑿.
The matrix 𝑿−1 𝑨𝑿 is diagonal, period. This is the Jordan
form of 𝑨-when 𝑨 can be diagonalized.

In the general case, eigenvectors are missing and 𝑨 can't be


reached. Suppose 𝑨 has s independent eigenvectors. Then it
is similar to a Jordan matrix with s blocks. Each block has
an eigenvalue on the diagonal with 1 's just above it. This block
accounts for exactly one eigenvector of 𝑨. Then 𝑩 contains
generalized eigenvectors as well as ordinary eigenvectors.

When there are n eigenvectors, all n blocks will be 1 by 1. In


that case 𝑱 = Λ.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 129
Jordan Form
The Jordan form solves the differential equation du/ dt = Au
for any square matrix 𝑨 = 𝑩𝑱𝑩−𝟏 .

The solution 𝑒 𝑨𝑡 𝒖(0) becomes 𝒖(𝑡) = 𝑩𝑒 𝑱𝑡 𝑩−1 𝒖(0).

𝑱 is triangular and its matrix exponential 𝑒 𝑱𝑡 involves 𝑒 𝜆𝑡


times powers 1, 𝑡, … , 𝑡 𝑛−1 .

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 130
Jordan Form
(Jordan form) If 𝑨 has s independent eigenvectors, it is
similar to a matrix 𝑱 that has s Jordan blocks 𝑱1 , … , 𝑱𝑠 on its
diagonal. Some matrix B puts 𝑨 into Jordan form :
𝑱𝟏
Jordan form 𝑩−𝟏 𝑨𝑩 = ⋱ =𝑱
𝑱𝒔

Each block 𝑱𝑖 has one eigenvalue 𝜆𝑖 , one eigenvector, and 1


's just above the diagonal:
𝜆𝑖 𝟏
Jordan block 𝐽𝒊 = . .
. 𝟏
𝜆𝑖
Matrices are similar if they share the same Jordan form J-
not otherwise.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 131
Jordan Form
The Jordan form 𝑱 has an off-diagonal 1 for each missing
eigenvector (and the 𝑙's are next to the eigenvalues).
In every family of similar matrices, we are picking one
outstanding member 𝑱. It is nearly diagonal. We can quickly
solve du/ dt = Ju and take powers 𝑱𝑘 . Every matrix in the
family has the form 𝑩𝑱𝑩−1 .
The reasoning is rather intricate and in actual computations
the Jordan form is not at all popular-its calculation is not
stable. A slight change in 𝑨 will separate the repeated
eigenvalues and remove the off-diagonal 1 's-switching
Jordan to a diagonal 𝑨.
Proved or not, you have caught the central idea of
similarity-to make 𝑨 as simple as possible while preserving
its essential properties. The best basis B gives 𝑩−1 𝑨𝑩 = J.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 132
Jordan Form
Question Find the eigenvalues and all possible Jordan
forms if 𝑨2 = zero matrix.
Answer The eigenvalues must all be zero, because 𝑨𝒙 = 𝜆𝒙
leads to 𝑨2 𝒙 = 𝜆2 𝒙 = 0𝒙. The Jordan form of A has 𝑱2 = 0
because 𝑱2 = 𝑩−1 𝑨𝑩 𝑩−1 𝑨𝑩 = 𝑩−1 𝑨2 𝑩 = 𝟎. Every block
in 𝑱 has 𝜆= 0 on the diagonal. Look at 𝑱2𝑘 for block sizes 1, 2,
3:
2
2 0 1 0 0 0 1
0 1 0 0
02= 0 = 0 0 1 = 0 0 0
0 0 0 0
0 0 0 0 0 0

Conclusion: If 𝑱2 = 0 then all block sizes must be 1 or 2. 𝑱2 is


not zero for 3 by 3. The rank of 𝑱 (and 𝑨) will be the total
number of 1's. The maximum rank is 𝑛/2. This happens
when there are 𝑛/2 blocks, each of size 2 and rank 1.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 133
Discrete Fourier Transform

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
Discrete Fourier Transform
4 𝑩𝑖𝑛 = 𝑩𝑜𝑢𝑡 = Fourier matrix F. Then 𝑭𝒙 is a Discrete
Fourier Transform of 𝒙. The Fourier matrix with columns
(1, 𝜆, 𝜆2 , 𝜆3 ) is important. Those are good basis vectors to
work with.
We ask: Which matrices are diagonalized by 𝑭? This time
we are starting with the eigenvectors (1, 𝜆, 𝜆2 , 𝜆3 ) and
finding the matrices that have those eigenvectors :
0 1 0 0 1 1
𝜆 𝜆
If 𝜆4 = 1 then: 𝑷𝒙 = 0 0 1 0 = λ =𝜆x
0 0 0 1 𝜆2 𝜆 2

1 0 0 0 𝜆3 𝜆3
P is a permutation matrix. The equation 𝑷𝒙 = 𝜆𝒙 says that
𝒙 is an eigenvector and 𝜆 is an eigenvalue of 𝑷. Notice how
the fourth row of this vector equation is 1 = 𝜆4 . That rule
for 𝜆 makes everything work.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 135
Discrete Fourier Transform
The four numbers 𝜆 = 1, 𝑖, −1, −𝑖 all satisfy 𝜆4 = 1. So those
four numbers are the eigenvalues of 𝑷, each with its
eigenvector 𝒙 = (1, 𝜆, 𝜆2 , 𝜆3 ). The eigenvector matrix 𝑭
diagonalizes the permutation matrix 𝑷
1 0 0 0
Eigenvalue matrix 𝜦 = 0 𝑖 0 0
0 0 −1 0
1 0 0 −𝑖
1 1 1 1
Eigenvector matrix is Fourier matrix 𝑭: 1 𝑖 −1 −𝑖
1 𝑖2 1 −𝑖 2
1 𝑖3 −1 −𝑖 3
Those columns of 𝑭 are orthogonal because they are
eigenvectors of 𝑷 (an orthogonal matrix). Unfortunately 𝑭 is
complex. Multiplications 𝑭𝒙 are done by the FFT.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 136
Discrete Fourier Transform
What other matrices beyond 𝑷 have this same eigenvector
matrix 𝑭 ?
We know that 𝑷2 and 𝑷3 and 𝑷4 have the same eigenvectors
as 𝑷. The same matrix 𝑭 diagonalizes all powers of 𝑷. And
the eigenvalues of 𝑷2 and 𝑷3 and 𝑷4 are the numbers 𝜆2 and
𝜆3 and 𝜆4 . For example 𝑷2 𝒙 = 𝜆2 𝒙
0 0 1 0 1 1
0 0 0 1 𝜆 𝜆
𝑷2 𝒙 = =𝜆 2 4
2 = 𝜆 𝒙 𝑤ℎ𝑒𝑛 𝜆 = 1
1 0 0 0 𝜆2 𝜆
0 1 0 0 𝜆3 𝜆3

The fourth power is special because 𝑷4 = 𝑰. When we do the


"cyclic permutation“ four times, 𝑷4 𝒙 is the same vector x
that we started with. The eigenvalues of 𝑷4 = 𝑰 are just 1, 1,
1, 1. And that number 1 agrees with the fourth power of all
the eigenvalues of 𝑷 : 14 = 1 and 𝑖4 = 1 and (−1)4 = 1
(−𝑖)4Engineering
and Advanced = 1. Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
137
Discrete Fourier Transform
One more step brings in many more matrices. If 𝑷 and
𝑷2 and 𝑷3 and 𝑷4 = 1 have the same eigenvector matrix F,
so does any combination 𝑪 = 𝑐1𝑷 + 𝑐2𝑷2 + 𝑐3 𝑷3 + 𝑐0 𝟏:
𝑐0 𝒄𝟏 𝑐2 𝑐3 has eigenvectors in the Fourier matrix F
𝑐3 𝑐0 𝒄𝟏 𝑐2 has four eigenvalues 𝑐0 + 𝑐1 𝜆 + 𝑐2 𝜆2 + 𝑐3 𝜆3
𝑪= 𝑐 𝑐3 𝑐0 𝒄𝟏 from the 4 numbers 𝜆 = 1, 𝑖, −1, −𝑖
2
𝒄𝟏 𝑐2 𝑐3 𝑐0 The eigenvalue from 𝜆 = 1 is
𝑐0 + 𝑐1 + 𝑐2 + 𝑐3

That was a big step. We have found all the matrices


(circulant matrices 𝑪) whose eigenvectors are the Fourier
vectors in 𝑭.

We also know the four eigenvalues of 𝑪, but we haven't


given them a good formula or a name until now:

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 138
Discrete Fourier Transform
The four eigenvalues of 𝑪 are given by the Fourier
transform 𝑭𝒄:
1 1 1 1 𝑐0 𝑐0 + 𝑐1 + 𝑐2 + 𝑐3
1 𝑖 −1 −𝑖 𝑐1 𝑐0 + 𝑖𝑐1 − 𝑐2 − 𝑖𝑐3
𝑭𝒄 = 1 𝑖2 1 −𝑖 2 𝑐2 = 𝑐0 − 𝑐1 + 𝑐2 − 𝑐3
1 𝑖3 −1 −𝑖 3 𝑐3 𝑐0 − 𝑖𝑐1 − 𝑐2 + 𝑖𝑐3

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 139
Discrete Fourier Transform
Example The same ideas work for a Fourier matrix 𝑭 and a
circulant matrix 𝑪 of any size. Two by two matrices look
trivial but they are very useful. Now eigenvalues of 𝑷 have
𝜆2 = 1 instead of 𝜆4 = 1 and the complex number 𝑖 is not
needed: 𝜆 = ±1.

Fourier matrix 𝑭 from eigenvectors of 𝑷 and 𝑪


1 1 0 1
𝑭= ,𝑷 =
1 −1 1 0
𝑐0 𝑐1
Circulant 𝑐0 𝑰 + 𝑐1 𝑷, 𝑪 = 𝑐 𝑐
1 0

The eigenvalues of C are 𝑐0 + 𝑐1 and 𝑐0 − 𝑐1. Those are


given by the Fourier transform 𝐹 𝑐 when the vector 𝑐 is
(𝑐0, 𝑐1). This transform 𝑭𝒄 gives the eigenvalues of 𝐶 for any
size n.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 140
Discrete Fourier Transform
Notice that circulant matrices have constant diagonals. The
same number c0 goes down the main diagonal. The number
c1 is on the diagonal above, and that diagonal "wraps
around" or "circles around" to the southwest corner of 𝑪.

This explains the name circulant and it indicates that these


matrices are periodic or cyclic. Even the powers of 𝜆 cycle
around because 𝜆4 = 1 leads to 𝜆5 , 𝜆6 , 𝜆7 , 𝜆8 = 𝜆, 𝜆2 , 𝜆3 , 𝜆4 .

Constancy down the diagonals is a crucial property of 𝑪. It


corresponds to constant coefficients in a differential equation.
This is exactly when Fourier works perfectly!
𝑑2 𝑢
= −𝑢 is solved by 𝑢 = 𝑐0 𝑐𝑜𝑠𝑡 + 𝑐1 𝑠𝑖𝑛𝑡
𝑑𝑡 2
𝑑2 𝑢
= 𝑡𝑢 cannot be solved by elementary functions.
𝑑𝑡 2
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 141
Discrete Fourier Transform
𝑑2 𝑢
= −𝑢 is solved by 𝑢 = 𝑐0 𝑐𝑜𝑠𝑡 + 𝑐1 𝑠𝑖𝑛𝑡
𝑑𝑡 2
𝑑2 𝑢
= 𝑡𝑢 cannot be solved by elementary functions.
𝑑𝑡 2

These equations are linear. The first is the oscillation


equation for a simple spring. It is Newton's Law f = ma with
mass m = 1, a = d2u/dt2, and force f = -u.

Constant coefficients produce the differential equations that


you can really solve.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 142
Discrete Fourier Transform
𝑑2 𝑢
The equation = 𝑡𝑢 has a variable coefficient t. This is
𝑑𝑡 2
Airy’s equation in physics and optics.

The solutions change completely when t passes through 0,


and those solutions require infinite series.

The point is that equations with constant coefficients have


simple solutions like 𝑒 𝜆𝑡 . 𝜆 is like an eigenvalue. For 𝑢 =
𝑐𝑜𝑠𝑡 and 𝑢 = 𝑠𝑖𝑛𝑡, the number is 𝜆 = 𝑖.

Euler’s great formula 𝑒 𝑖𝑡 = 𝑐𝑜𝑠𝑡 + 𝑖𝑠𝑖𝑛𝑡 introduces complex


numbers as we saw in the eigenvalues of 𝑷 and 𝑪.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 143
Basis for function space

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
Basis for Function Spaces
For functions of x, the first basis contains the powers
1, 𝑥, 𝑥2, 𝑥3, … Unfortunately this is a terrible basis.

Those functions 𝑥𝑛 are just barely independent. 𝑥10 is almost


a combination of other basis vectors 1, 𝑥, … , 𝑥9 . It is
virtually impossible to compute with this poor "ill-
conditioned" basis.

If we had vectors instead of functions, the test for a good


basis would look at 𝑩𝑇 𝑩.

This matrix contains all inner products between the basis


vectors (columns of 𝑩).

The basis is orthonormal when 𝑩𝑇 𝑩 = 𝑰


Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 145
Basis for Function Spaces
But the basis 1, 𝑥, 𝑥2 , … produces the evil Hilbert matrix :
𝑩𝑇 𝑩 has an enormous ratio between its largest and smallest
eigenvalues.

A large condition number signals an unhappy choice of


basis.

Note Now the columns of 𝑩 are functions instead of vectors.


We still use 𝑩𝑇 𝑩 to test for independence. So we need to
know the dot product (inner product is a better name) of
two functions-those are the numbers in 𝑩𝑇 𝑩.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 146
Basis for Function Spaces
The dot product of vectors is 𝒙𝑇 𝒚 = 𝑥1 𝑦1 + ⋯ + 𝑥𝑛 𝑦𝑛 . The
inner product of functions will integrate instead of adding.

Inner product 𝑓, 𝑔 = ‫𝑥𝑑 𝑥 𝑔 𝑥 𝑓 ׬‬


Complex inner product 𝑓, 𝑔 = ‫𝑥𝑑 𝑥 𝑔)𝑥(𝑓 ׬‬,
𝑓(𝑥) =complex conjugate

Weighted inner product 𝑓, 𝑔 𝑤 =‫𝑔)𝑥(𝑓)𝑥(𝑤 ׬‬ 𝑥 𝑑𝑥,


𝑤(𝑥) =weight function

When the integrals are from x=0 to x=1, the inner product of
𝑥 𝑖 and 𝑥 𝑗 is:

1 𝑖 𝑗 1
‫׬‬0 𝑥 𝑥 𝑑𝑥 = (entries of Hilbert space 𝑩𝑇 𝑩)
𝑖+𝑗+1
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 147
Basis for Function Spaces
By changing to the interval 𝑥 = −1 to 𝑥 = 1, we
immediately have orthogonality between all even functions
and all odd functions:

1 1
න 𝑥 2 𝑥 5 𝑑𝑥 = 0, න 𝑒𝑣𝑒𝑛 𝑥 𝑜𝑑𝑑 𝑥 𝑑𝑥 = 0
−1 −1

This change makes half of the basis functions orthogonal to


the other half. It is so simple that we continue using the
symmetric interval from −1 to 1 (or from −𝜋 to 𝜋).

But we want a better basis than the powers 𝑥 𝑛 - hopefully


an orthogonal basis.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 148
Legendre polynomials and
Chebyshev polynomials

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
Orthogonal Basis for Function Space
5. The Fourier basis 1, sin 𝑥, cos 𝑥, sin 2𝑥, cos 2𝑥, …

1 3
6. The Legendre basis 1, 𝑥, 𝑥 2 − , 𝑥3 − 𝑥, …
3 5

7. The Chebyshev basis 1, 𝑥, 2𝑥 2 − 1,4𝑥 3 − 3𝑥, …

The Fourier basis functions (sines and cosines) are all


periodic. They repeat over every 2𝜋 interval because cos(𝑥 +
2𝜋) = cos 𝑥 and sin(𝑥 + 2𝜋) = sin 𝑥. So this basis is
especially good for functions 𝑓 (𝑥) that are themselves
periodic : 𝑓 (𝑥 + 2𝜋) = 𝑓 ( 𝑥).

This basis is also orthogonal. Every sin and cos is orthogonal


to every other sine and cosine. Of course we don't expect
the basis function cos nx to be orthogonal to itself.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 150
Orthogonal Basis for Function Space
Most important, the sine-cosine basis is also excellent for
approximation. If we have a smooth periodic function 𝑓 ( 𝑥),
then a few sines and cosines (low frequencies) are all we
need. Jumps in 𝑓(𝑥) and noise in the signal are seen in
higher frequencies (larger n).
We hope and expect that the signal is not drowned by the
noise.
The Fourier transform connects 𝑓 ( 𝑥) to the coefficients
𝑎𝑘 and 𝑏𝑘 in its Fourier series:

Fourier series

𝑓 (𝑥) = 𝑎𝑜 + 𝑏1 𝑠𝑖𝑛𝑥 + 𝑎1 cos 𝑥 + 𝑏2 sin 2𝑥 + 𝑎2 cos 2𝑥 +


···
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 151
Orthogonal Basis for Function Space
Fourier series

𝑓 (𝑥)
= 𝑎𝑜 + 𝑏1 𝑠𝑖𝑛𝑥 + 𝑎1 cos 𝑥 + 𝑏2 sin 2𝑥 + 𝑎2 cos 2𝑥 + · · ·

We see that function space is infinite-dimensional. It takes


infinitely many basis functions to capture perfectly a typical
𝑓 ( 𝑥). But the formula for each coefficient (for example 𝑎3)
is just like the formula 𝒃𝑇 𝒂/ 𝒂 𝑇 𝒂 for projecting a vector 𝒃
onto the line through 𝒂. Here we are projecting the function
𝑓 ( 𝑥) onto the line in function space through cos 3𝑥 :

< 𝑓 𝑥 , 𝑐𝑜𝑠3𝑥 > ‫𝑠𝑜𝑐 𝑥 𝑓 ׬‬3𝑥𝑑𝑥


𝑎3 = =
< 𝑐𝑜𝑠3𝑥, 𝑐𝑜𝑠3𝑥 > ‫𝑠𝑜𝑐 ׬‬3𝑥𝑐𝑜𝑠3𝑥𝑑𝑥

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 152
Orthogonal Basis for Function Space
Legendre polynomials are the result of applying Gram-
Schmidt. Orthogonalize 1, 𝑥, 𝑥2, . . . To start, the odd function
𝑥 is already orthogonal to the even function 1 over the
interval from −1 to 1. Their product ( 𝑥) ( 1) = 𝑥 integrates
2 2
to 0. But the inner product between 𝑥2 and 1 is ‫׬‬−1 𝑥 2 𝑑𝑥 =
3
1 2
< 𝑥 2, 1
> ‫׬‬−1 𝑥 𝑑𝑥 2/3 1
= 1 = =
< 1,1 > ‫׬‬−1 1𝑑𝑥 2 3
2 1
So Gram-Schmidt gives: 𝑥 − =Legendre. Similarly x3 has
3
a component 3𝑥 / 5 in the direction of the odd function 𝑥 :
3 1 4
< 𝑥 , 𝑥 > ‫׬‬−1 𝑥 𝑑𝑥 2/5 3
= 1 = =
< 𝑥, 𝑥 > ‫׬‬−1 𝑥 𝑑𝑥 2/3 5
2
3
So Gram-Schmidt gives: 𝑥3 − 𝑥 =Legendre. Continuing
5
Gram-Schmidt for 𝑥 4 , 𝑥 5 , … gives every Legendre function.
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras)
153
Orthogonal Basis for Function Space
Finally we turn to the Chebyshev polynomials 1, 𝑥, 2𝑥 2 −
1,4𝑥 3 − 3𝑥, …. They don't come from Gram-Schmidt.

Instead they are connected to 1, cos𝜃 , cos2 𝜃, cos3 𝜃. This


gives a giant computational advantage-we can use the Fast
Fourier Transform.

The connection of Chebyshev to Fourier appears when we


set 𝑥 = cos 𝜃 :
2𝑥 2 − 1 = 2 𝑐𝑜𝑠𝜃 2 − 1 = 𝑐𝑜𝑠2𝜃
4𝑥 3 − 3𝑥 = 4 𝑐𝑜𝑠𝜃 3 − 3cos𝜃 = 𝑐𝑜𝑠3𝜃
The nth degree Chebyshev polynomial 𝑇𝑛 (𝑥) converts to
Fourier's cos n𝜃 = 𝑇𝑛 (cos 𝜃).

Note These polynomials are the basis for a big software


project called "chebfun".
Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 154
Orthogonal Basis for Function Space
2𝑥 2 − 1 = 2 𝑐𝑜𝑠𝜃 2 − 1 = 𝑐𝑜𝑠2𝜃
4𝑥 3 − 3𝑥 = 4 𝑐𝑜𝑠𝜃 3 − 3cos𝜃 = 𝑐𝑜𝑠3𝜃

The nth degree Chebyshev polynomial 𝑇𝑛 (𝑥) converts to


Fourier's cos n𝜃 = 𝑇𝑛 (cos 𝜃).
Every function f(x) is replaced by a super-accurate
Chebyshev approximation.
Then you can integrate 𝑓(𝑥), and solve 𝑓(𝑥) = 0, and find
its maximum or minimum. More than that, you can solve
differential equations involving 𝑓 ( 𝑥 ) −fast and to high
accuracy.
When chebfun replaces 𝑓(𝑥) by a polynomial, you are
ready to solve problems.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 155
Orthogonal Basis for Function Space
REVIEW OF THE KEY IDEAS

1. A basis is good if its matrix 𝑩 is well-conditioned.


Orthogonal bases are best.
2. Also good if 𝜦 = 𝑩−1 𝑨𝑩 is diagonal. But the Jordan form
𝑱 can be very unstable.
3. The Fourier matrix diagonalizes constant-coefficient
periodic equations: perfection.
4. The basis 1, 𝑥, 𝑥2, . . . leads to 𝑩𝑇 𝑩 = Hillbert matrix:
Terrible for computations.
5. Legendre and Chebyshev polynomials are excellent
bases for function spaces.

Advanced Engineering Mathematics, Univ. of Notre Dame, Notre Dame, IN, USA (Fall 2019, N. Zabaras) 156

You might also like