Matrices
For grade 1, undergraduate students
Abstract. Matrix theory plays a very important role for solving linear equations, representing some linear transformations such as T:Rn→Rn , and applying in many other fields.
Keywords. Matrix; the operations of matrix
.Some notations
Definition. A rectangular array of numbers composed of rows and columns
is called an matrix (read m by n matrix1). We also say that the matrix A is of, or has, size .
Remark. If there is possibility of confusing entries from two adjacent columns as a product we will insert commas between the entries of a given row to carefully distinguish which entry belongs to which column.
The elements form the i-th row of A and the elements
form the j-th column of A. We will often write
for A, or simply
when m and n are understood from context.
Remark. The order of the subscripts is important; the first subscript denotes the row and the second subscript the column to which an entry belongs.
Just as with vectors in Rn , two matrices are equal iff they have the same entries. That is:
Definition. If matrices, then iff for i=1,2…, m and j=1,…,n.
Our study of linear transformations suggests the following definitions.
Definition. If two matrices, their sum, , is the matrix , where , i=1,2…, m , j=1,2…,n.
Definition. If is an matrix and r is a number then rA, the scalar multiple of A by r, is the matrix where i=1,2…, m and j=1,…,n.
The following result is a routine verification of definitions:
Proposition 1. The matrices of size form a vector space under the operations of matrix addition and scalar multiplication. We denote this vector space by Mmn.
The dimension of the vector space Mmn is not hard to compute. We take our lead from the method we used to show that dim Rn=n. Introduce the matrix by the requirement
For example thematrixis
It is then a routine verification to prove:
Proposition 2. The vectors form a basis for . Therefore dim.
EXAMPLE 1.
EXAMPLE 2.
EXAMPLE 3.
Definition. Ifis an matrix andis an matrix, their matrix product is the matrix , where
where
Thus the entry of the i-th row and j-th column of the product. A.B is obtained by taking the i-th row
of the matrix A and the j-th column of the matrix B
multiplying the corresponding entries together and adding the resulting products, i.e.
where
Remark. Note that for the product of A and B to be defined the number of columns of A must be equal to the number of rows of B. Thus the order in which the product of A and B is taken is very important, for AB can be defined without AB being defined.
EXAMPLE 4. Compute the matrix product
Solution. Note the answer is amatrix.
Remark. Note that the product
is not defined.
EXAMPLE 5. Compute the matrix product
Answer
EXAMPLE 6. Let
and
Calculate the product AB
Solution. We have
Remark. Note that the product BA is not defined.
Definition. A matrix A is said to be a square matrix of size n iff it has n rows and n columns (that is the number of rows equals the number of columns equals n).
Remark. It is easy to see that if A and B are square matrices of size n then the products AB and BA are both defined. However they may not be equal..
EXAMPLE 7. Let
Compute the matrix products AB and BA.
Solution. We have
and so we see that ABBA.
Remark. As the preceding example shows even if AB and BA are defined we should not expect that AB=BA.
Notation. If A is a square matrix then AA is defined and is denoted by A2.
Similarly,
is defined and denoted by
EXAMPLE 8. Let
Calculate
Solution. We have
Thus not only does matrix multiplication behave strangely in which it is not commutative, it is also possible for the square of a matrix with nonzero entries to have only zero entries.
The rules of matrix operations
Now, we may summarize the basic rules of matrix operations in the following formulas: (assume that the indicated operations are defined, that is , that the sizes are correct for the operations to make sense.)
(1) A+B=B+A
(2) A+(B+C)=A+(B+C)
(3) r(A+B)=rA+rB
(4) A+0=A
(5) 0A=0
(6) A+(-1)A=0
(7) (r+s)A=rA+sA
(8) (A+B)·C=A·C+C·B
(9) 0·A=0=A·0
(10) A·(B·C)=(A·B) ·C
In discussing matrices it is convenient to distinguish certain special types of matrices.
Special types of matrices
The identity matrix, the identity matrix of size n is the square matrix denoted by I, where
For example, the identity matrices of size1,2,3and 4 are
The following important facts are easily verified
IB=B for anymatrix B,
AI=A for any matrix A.
Scalar matrices. A square matrix A=is called a scalar matrix iff A=rI for some number r.
For example
is a scalar matrix but
is not scalar matrix.
The following formulas are easily checked
(1) (aI)B=aB for any matrix B.
(2) A(aI)=aA for any matrix B.
For example
Diagonal matrices. For any square matrix A=of size n, the entries
are called the diagonal entries of A. For example, the diagonal entries of
are 3,5,7. A square matrix is said to be a diagonal matrix iff its only nonzero entries are on the diagonal. That is A= is a diagonal matrix iff for .
For example I and aI are diagonal matrices as it is
Remark. The diagonal entries themselves need not be nonzero . For example
and
are also diagonal matrices.
In general a diagonal matrix looks like
where the giant 0s mean that all other entries are zero. If A and B are diagonal matrices of size n then so are AB and BA. Indeed if
and B
then
=BA
Triangular matrices. A square matrix A is said to be lower triangular iff A= where if .
For example
is a lower triangular matrix.
A triangular matrix A= where (that is ,all of whose diagonal entries are 0) is said to be strictly triangular.
An example of a strictly triangular matrix is
The Zero matrix. The zero matrix of size is the matrix 0 all of those entries are 0.
Idempotent matrices. A square matrix A is said to be idempotent iff .
There are lots of idempotent matrices. Here are a few examples
as may be easily checked by explicit computation.
Nilpotent matrices. A square matrix A is said to be nilpotent iff there is an integer q such .(The smallest such integer q is called the index of nilpotence of A).
For example if A is the matrix of the shift operator on , that is
then
and
so the A is nilpotent of index 3.
Nonsingular matrices. A square matrix A is said to be invertible or nonsingular iff there exists a matrix B such that
AB=I and BA=I.
If A is nonsingular then the matrix B With AB=I=BA is called the inverse matrix of A and is denoted by .
It A is nonsingular then the matrix B with AB=I=BA is called the inverse matrix of A and is denoted by
It is a theorem that we can prove that if there exists a matrix B such that
AB=I.
Then also
BA=I.
Thus to check that B= we need only calculate one of the two products AB and BA and see if they are I. For example if
then
for we have
and therefore A=.
An example of a matrix that is not invertible is
and more generally we have ;
A nilpotent matrix is not invertible. For suppose that A is a nilpotent matrix that is invertible. Let B be an inverse for A. Since A is nilpotent there is an integer q such that
Then
so
We may then repeat the above trick to show
If we repeat this trick times we will get
But then
which is impossible.
We may also show:
The only invertible idempotent matrix is I. For if A is an idempotent matrix then
implies
.
So A=I as claimed.
Symmetric and skew-symmetric matrices. A square matrix A= is said to symmetric iff for it is said to be skew-symmetric iff for
For example
are symmetric matrices, and
are skew-symmetric matrices. Notice that the matrix
is not skew-symmetric because
That is to say, if a matrix A=is skew-symmetric then the equations
certainly imply that , that is skew-symmetric matrix has all its diagonal entries equal to 0.
The skew-symmetric matrix
is interesting because it is also nonsingular since
.
Proposition 3 A matrix
is nonsingular iff If then
PROOF. Suppose that ,Let
Then
and therefore A is nonsingular with
as claimed.
Suppose conversely that A is nonsingular, but that . We will deduce a contradiction. Let
Then computing as above
This gives the equation
.
Therefore
so that
.
But then A=0 also, so
so
and hence 1=0, which is impossible.
SOME EXERCISES
1. Perform the following matrix multiplications
2. Which of the following matrices are nonsingular, idempotent, nilpotent, symmetric, or skew-symmetric?
Find the inverse for those that are invertible.
3. If is a matrix we define the transpose of A to be the matrix where . Find the transpose of each of the following matrices:
Show for any matrix A that =A.
4. Let A be a square matrix. Show that A is symmetric iff A is skew-symmetric iff
5. For any square matrix A show that is symmetric and is skew-symmetric.
6. Let A be an idempotent matrix. Show that I-A is also idempotent.
7. A square matrix A is said to commute with a matrix B iff AB=BA. When does a matrix A commute with the matrix ?
8. Show that if a matrix A commutes with every matrix B then A is a scalar matrix. (Hint: If A commutes with every matrix B it commutes with the 9 matrices ).
9. Find all matrices that commute with
.
10. Construct a matrix A such that
11. Let A be a matrix, D be the diagonal matrix
.
(a) Compute D:A
(b) Compute A:D
12. Let A be matrix. Compute . What conclusion can you obtain in general for .A and A?
13. If A is an idempotent square matrix show I-2A is invertible (Hint: Idempotent correspond to projections. Interpret I-2A as a reflection. Try the case first. Then try to generalize.)