Mathematics with Maple

S.Duzhin

Lesson 8: Linear Operators

Mathematics: operators, their matrices; Jordan normal form.

Maple: with(linalg).

In the previous lesson, we have reviewed operations with matrices. In fact, a matrix is nothing but a way to represent information about a linear operator.

A linear operator T acts from a linear space V into a linear space W and has two properies:

1. (additivity) T(x+y) = T(x) + T(y)

2. (scalar multiplicativity) T(ax) = a T(x), if x is a vector and a is a number.

I will recall the crucial notion of the matrix of a linear operator in the case when both W=V and V is a 2-dimensional linear space.

Let e1,e2 be a basis of the space V. Any vector x can be writen as

x = x1*e1 + x2*e2;

where x1 and x2 are two numbers called "coordinates" of x in the basis [e1,e2].

Now, by the properties of T,

T(x) = x1*T(e1) + x2*T(e2).

This means that if we know only two values T(e1) and T(e2), then we can easily find the value T(x) for any x.

T(e1) and T(e2) are two elements of V, so they can be written as

T(e1) = a11*e1 + a21*e2,

T(e2) = a12*e1 + a22*e2.

Then

T(x) = x1*(a11*e1 + a21*e2) + x2*(a12*e1 + a22*e2)

= (a11*x1 + a12*x2)*e1 + ( a21*x1 + a22*x2)*e2.

This means that the operator T acts by the following rule:

[ x1 ] [ a11*x1 + a12*x2 ] [ a11 a12 ] [ x1 ]

[ ] --> [ ] = [ ] * [ ]

[ x2 ] [ a21*x1 + a22*x2 ] [ a21 a22 ] [ x2 ]

where we use matrix multiplication in the right-hand side.

This short argument explains the reason why matrices are so important in the life of linear operators.

Let us look at some examples and do some exercises about the relation between matrices and linear operators.

Example 1.

Let V be the linear space of polynomials in x of degree no greater than 2. Let

S: V -> V be the difference operator which sends every polynomial P(x) into polynomial P(x)-P(x-1). Find the matrix of this operator

in the basis consisting of the three polynomials 1, x, x^2.

Solution.

Let e1 = 1, e2 = x-1/2, e3 = x^2 - x + 1/6.

Then S(e1) = 1-1 = 0 (because the polynomial e1 is a constant).

S(e2) = x - (x-1) = 1 = e1.

S(x2) = x^2 - (x-1)^2 = 2*x-1 = 2*e2 - e1.

(In the last line, you could use Maple:

> expand(x^2-(x-1)^2);

[Maple Math]

to get the answer).

Let us load the package "linalg":

> with(linalg):

and write the matrix of the linear operator as follows:

> A:=transpose(matrix([[0,0,0],[1,0,0],[-1,2,0]]));

[Maple Math]

Note that in this matrix the images of the basic vectors are arranged by columns: S(e1)=0 is in the first column, S(e2)=e1 in the second etc.

Since it is easier to input the matrix by rows, we have used "transpose".

The matrix of a linear operator depends on the choice of the basis.

If you take a different basis, you will get a different matrix. Before discussing the general rule, let us look at an example.

Example 2.

Find the matrix of the same operator S (see example 1)

in the basis consisting of the three polynomials 1, x-1, (x^2-x)/2

Solution.

Let f1 = 1, f2 = x-1, f3 = (x^2-x)/2. Then:

S(f1)=0,

S(f2) = x-1 - ((x-1)-1) = 1 = f1

S(f3) = x-1 = f2.

> f3:=(x^2-x)/2;

[Maple Math]

> expand(f3 - subs(x=x-1,f3));

[Maple Math]

The answer is:

> B:=transpose(matrix([[0,0,0],[1,0,0],[0,1,0]]));

[Maple Math]

In this example, we have directly computed the matrix in two different bases.

There is a general rule how the matrix of the operator changes when we change the basis.

First of all, given two bases e1,e2,e3 and f1,f2,f3, we form the transition matrix by putting the coordinates of f1,f2,f3 in the basis e1,e2,e3 into the columns.

For example, in our example

f1 = e1 = [1,0,0];

f2 = e2 - e1 = [-1,1,0];

f3 = e3/2 - e2/2 = [1/2,-1/2,0].

> C:=transpose(matrix([[1,0,0],[-1,1,0],[0,-1/2,1/2]]));

[Maple Math]

Then we have:

B = C^(-1)*A*C,

where A is the matrix in the basis e1,e2,..., B is the matrix in the basis f1,f2,...,

and C^(-1) is the inverse matrix. In Maple, this can be computed like this:

> multiply(inverse(C),multiply(A,C));

[Maple Math]

Which is equal to B, the result of computations Example 2.

Exercise 1. Find the matrix of the differentiation operator d/dx that acts in the vector space of polynomials in x of degree no greater than 2

(a) in the basis e1,e2,e3

(b) in the basis f1, f2, f3

Exercise 2. Find the matrix of the linear operator which acts in the vector space of all matrices 2x2 as a multiplication by a fixed matrix A = [[a,b],[c,d]] on the left.

T : X --> A*X

Exercise 3. Let i,j,k be the set of basic vectors of the Euclidean 3-dimensional space. Find the matrix of the linear operator T which sends every vector v of the space into the vector product i x v (here x means the vector product, not the letter x!)

Now let us consider one more example related to the most difficult chapter of linear algebra that you studied in first year -- Jordan normal form of the matrix.

I will not try to explain all the theory related to Jordan forms, the only thing that you have to remember is that the Jordan form of a matrix A is a new matrix J which is related to A by the formula

J = C^(-1)*A*C

where C is some non-degenerate matrix, and is the simplest matrix among all matrices J given by equation (1).

(If you understood what I explained about the change of the matrix of a linear operator a few lines above, you will see that the Jordan problem is just the problem of finding the simplest way to encode a linear operator by a matrix using the freedom of choosing a basis you like).

In Maple, there is a simple command that will do for you all the work necessary to find the Jordan form, and it will also show you the transition matrix C, if you specify it as a second parameter. (Of course, Maple will only do the computational work, not the thinking work for you :-)

> A:=matrix([[-2/3,1/3,1/3],[1/3,-2/3,1/3],[1/3,1/3,-2/3]]);

[Maple Math]

> J:=jordan(A);

[Maple Math]

To find the transition matrix:

> J:=jordan(A,'C');

[Maple Math]

> evalm(C);

[Maple Math]

Let us check whether C is in fact the transition matrix:

> multiply(inverse(C),multiply(J,C));

[Maple Math]

Now please do the exercises from your textbook of linear algebra (xerox copies of these exercises are available from me). You may want to begin right from the last Exercise related to the Jordan normal form.