We begin by reviewing matrix operations and the way that they are expressed using your computer algebra system. Open your computer algbera system now by clicking its icon in the navigation frame.
We are often interested in data that is most naturally written as a matrix or array.

For example, in chapter 1 we used matrices to represent images. Matrices are also discussed in the section on matrices in the mathematical infrastructure. In that section we discuss adding two matrices and multiplying a matrix by a real number.
Vectors can be thought of as matrices
Vectors are often thought of as either a matrix with one row

or as a matrix with one column.

We call a vector a row vector when we think of it as a matrix with one row and a column vector when we think of it as a matrix with one column.
The transpose of a matrix
It is sometimes useful to exchange the roles of the rows and columns. For example, consider the two matrices written below. The lefthand matrix describes the traffic flow each morning as commuters drive from their homes in three towns -- Oak, Elm, and Maple -- to their jobs at three companies -- ABC Co., DEF Co., and GHI Co. The table on the right shows the traffic each afternoon as commuters return home. Notice that the rows of the first matrix become the columns of the second matrix. This matrix is called the transpose of the first matrix.
\ \ \ To ABC Co. DEF Co. GHI Co. \ To Oak Elm Maple From \ From \ \ \ Oak \ 4,000 6,000 8,000 ABC \ 4,000 5,000 1,000 Elm \ 5,000 3,000 2,000 DEF \ 6,000 3,000 12,000 Maple \ 1,000 12,000 4,000 GHI \ 8,000 2,000 4,000
More generally, we write the transpose At of a matrix A as shown in the live image below. If you click on any element in either of the two matrices below the corresponding element of the other matrix will be outlined. Notice that each row of the original matrix becomes a column in the transpose and each column of the original matrix becomes a row in the transpose.
For example, if

then

Matrix multiplication
Now we define a new operation, called matrix multiplication, that takes an n by k matrix,

and a k by m matrix

and produces an n by m matrix

The elements in the ith row of C depend on the elements in the ith row of the first matrix A and the elements in the jth column of C depend on the elements of the jth column of the second matrix B as illustrated in the live picture below. Click on any element of the matrix C to see the elements in the matrices A and B that determine that element.
The matrix A must have the same number of columns as the number of rows in the matrix B. The formula that determines the elements of C is

For example,

Notice that because the matrix A has the same number of columns as the number of rows in the matrix B the summation

uses all the elements of the i-th row of A and the j-th column of B.
Find each of the following.


The following theorems are easy to prove.
Theorem
If A is an (n by k)-matrix, B is a (k by m)-matrix and c is any real number then
Theorem
If A is an (n by k)-matrix and B is a (k by m)-matrix then
Theorem
If A is an (n by k)-matrix, B is a (k by m)-matrix and C is a (m by p)-matrix then
Theorem
If A is an (n by k)-matrix, B is a (k by m)-matrix and C is a (k by m)-matrix then
Theorem
If A is an (n by k)-matrix, B is an (n by k)-matrix and C is a (k by m)-matrix then
Prove the four theorems above.
In the last section of Chapter 1 we defined the idea of a linear transformation.
Definition
Suppose that U and V are two vector spaces. A transformation
is linear if for any two vectors x and y in U and any two real numbers s and t,
The same concept can often be expresssed in several different but equivalent ways. The concept of a linear transformation is often expressed by the definition below.
Definition
Suppose that U and V are two vector spaces. A transformation
is linear if it satisfies the following two properties below.
Prove that the two definitions above are equivalent -- that is, any linear transformation satisfying the first definition satisfies the second and vice versa.
Examples

is linear.
is linear.
is linear.
is not linear.
is not linear.
is linear.
is not linear.
Verify each of the assertions listed as examples above.
You may have seen the tearm linear used in a different way before. For example, a function f : R --> R of the form
where m and b are constants, is often called "linear." This use of the term "linear" is different from the use in this course. The following theorem shows the difference.
Theorem
A function f : R --> R of the form
where m and b are constants, is linear if and only if the constant b is zero.
Proof
First, suppose that f(x) = m x. Then if x and y are any two vectors in R and s and t are any two real numbers, we have
f(s x + t y) = m (s x + t y) = m s x + m t y = s m x + t m y = s f(x) + t f(y)
So f is linear.
Now suppose that f : R --> r is linear and let m = f(1). Then for any vector x in R, we have
f(x) = f(x 1) = x f(1) = x m = m x,
which was what we wanted to show.
is linear if and only if there are constants m1, m2, ... mn, such that
by
where x is written as a column vector. Prove that T is a linear transformation.

and let
be given by
where A is an (n by k)-matrix and x is written as a column vector. Find T(ei) in the matrix A.
We can multiply two matrices A and B to obtain AB only when the number of columns of A is the same as the number of rows of B. We often have a situation when we want to multiply an (n by k)-matrix A by a k-dimensional vector x to obtain an n-dimensional vector Ax. Strictly speaking we should write this as

writing both vectors as column vectors. Typographically, row vectors consume less space on a page or screen than column vectors and so we often prefer using row vectors to column vectors. If we want to write both vectors as row vectors than we should write
Some computer algebra systems allow themselves some typographical freedom and write, less precisely,
For example, in the Mathematica session below notice the way that Mathematica interprets the vectors as column vectors without explicitly being told to do so.

We will allow ourselves the same typographical freedom.
Representing Linear Transformations by Matrices
In this subsection we show that any linear transformation
can be represented by a (k by n)-matrix and that the composition of linear transformations can be represented by matrix multiplication. This is an extremely powerful tool since most computer languages and many scientific calculators have built in operations for working with matrices.
Theorem
Suppose that
is a linear transformation. Then there is a (k by n)-matrix, A, such that the equation
can be written
where x and y are written as column vectors.
The proof of this theorem is available in a pdf file.
Theorem
In the first section of chapter 1 we defined several basic kinds of rigid transformations. Two of them -- reflection in the x-axis and rotation about the origin -- are linear transformations. These two rigid transformations can be represented by the following matrices.
Reflection in the x-axis:

Rotation about the origin:

In the second section of chapter 1 we defined a family of linear transformations called dilations. These linear transformations can be represented by the following matrices.

It is clear geometrically that these transformations are linear. The matrices above are determined as described in the preceding theorem.

We sometimes omit the subscript n when the dimension of the matrix is clear from the context. Show that if A is any (n by n)-matrix then
The (n by n)-matrix

is called the identity matrix because it is the identity element for matrix multiplication.
Theorem
Suppose that S : Rn --> Rk is a linear transformation and is expressed in the form
where A is an (k by n)-matrix. Suppose that T : Rk --> Rm is a linear transformation and is exressed in the form
Then the composition can be expressed by
Proof:
