Definition of A Matrix
Definition of A Matrix
. Matrices are twodimensional arrays created by arranging vectors into rows and columns. We
examine several fundamental types of matrices, as well as three basic operations on matrices and their properties.
Definition of a Matrix
DEFINITION
1 7
-5
matrix
C =
1 2 3
4 56
7 8 9
3 x 3 matrix
3 x 2 matrix
D =
1
- 2
3 x 1 matrix
E = [ 4 - 3 0]
1 x 3 matrix
1 x 1 matrix
Two 111 x 7? matrices A and B are equal if and only if all of their corresponding
entries are equal. That is, A = B if a,j = bjj for all /, 1 < i < in, and for all
J- 1 < j
< n.
Note that the following may be considered equal as vectors but not as
matrices:
3
- 2
[3, - 2 . 4] and
4
since the former is a 1 x 3 matrix, but the latter is a 3 x 1 matrix.
Special Types of Matrices
We now describe a few important types of matrices.
A square matrix is an n x n matrix; that is, a matrix having the same number
of rows as columns. For example, the following matrices are square:
5 0
A 9 -2
and
1 2 3'
4 56
7 8 9
B -
A diagonal matrix is a square matrix in which all entries that are not on
the main diagonal are zero. That is, A is diagonal if and only if
== 0 for / ^ j.
For example, the following are diagonal matrices:
6 0
0 7
0
0
0
F =
0 - 2
0
II
0
0
4 0
0
0 0
0
0 0 -2
0 0
0
and
-[1!]
However, the matrices are not diagonal. (The main diagonal elements have
been shaded in each case.) We use V,, to represent the set of all n x n diagonal
matrices.
-[
and
J =
"
0
7
5
4
0
3'
-2
An identity matrix is a diagonal matrix with all main diagonal entries equal
to 1. That is, an n x n matrix A is an identity matrix if and only if cijj = 0 for
i / j and an = 1 for 1 < i < n. The n x n identity matrix is denoted by I. For
example, the following are identity matrices:
Io =
1
0
0
1
and
I4 =
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
If the size of the identity matrix is clear from the context, I alone may be used.
An upper triangular matrix is a square matrix with all entries below the
main diagonal equal to zero. That is, an /; x /; matrix A is upper triangular if and only if
= 0 for i > j. For example, the following are upper
triangular:
"6
p =
0
0
9
-2
0
11 "
3
5
and
R=
3
9
14
-2
-6
-2
-4
0
0
9
0
0
5
8
3
Similarly, a lower triangular matrix is one in which all entries above the
main diagonal equal zero; for example,
We use Un to represent the set of all n x n upper triangular matrices and
Cn to represent the set of all n x n lower triangular matrices.
A zero matrix is any matrix all of whose entries are zero. Om denotes the
m x n zero matrix, and O,, denotes the n x n zero matrix. For example,
0
0
0 2 :i =
0
0
0
0
and
O-) =
0
0
0
0
If the size of the zero matrix is clear from the context, O alone may two used.
Addition and Scalar Multiplication with Matrices
DEFINITION
Let A and B both be m x n matrices. The sum of A and B is the m x /;
matrix (A + B) whose (/', j) entry is equal to a,, + bij.
As wit h vectors, matrices are summed simply by adding t heir corresponding
entries together. For example,
6-321
o
'
5 - 6 -3"
-4 -2 -4
11 - 9 - 1
-11 -2
0
Notice that the definition does not allow addition of matrices with different
sizes. For example, the following matrices cannot be added:
A =
-2 3 0
1 4 -5
and
B=
6
-2
I
7
5
I
4-16
7 , then 2A = - 8
- 4
2 4 9 -5
2-12-14
- 8
-18
10
THEOREM 1.11
Let A, B. and C be m x n matrices (elements of Mmn), and let c and d be
scalars. Then
(1)
(2)
(3)
A+ B= B+ A
A + (B -f- C) = (A + B) + C
Omn + A = A + 0, = A
(4)
A + ( - A ) = ( - A ) + A = Omn
(5)
(6)
(7)
c (A -f- B) = cA -|- cB
(c + d) A = cA + dA
(cd) A = c(dA)
(8)
1(A) = A
(/, j) entry of B + A is the sum of bjj and a,y. But a, j + b,, = bij + a,/, by the
commutative property of addition for real numbers. Hence, A + B = B + A,
because their corresponding entries agree.
if A =
then A
6
-2
3
1
10
4
0
8
6-231
10 4 0 8
and
B=
and
1 5-3
0-4
6
0 0-5
B7 =
1 0 0
5 -4 0
-3 6 -5
Notice that the transpose changes the rows of A into the columns of A ' .
Similarly, the columns of A become the rows of A ' . Also note that the transpose of an upper triangular matrix (such as B) is lower triangular, and vice
versa.
Three useful properties of the transpose are given in the next theorem. We
prove one and leave the others as Exercise 11.
THEOREM 1.12
Let A and B both be m x n matrices, and let c be a scalar. Then
(1)
(2)
(3)
(A7y = A
(A + B)7" = A 7 + B7"
(cA)7" = c(A 7 )
4'
6 - 1
and
B=
0-3
0 - 1 3 6
1 0
2-5
-3-2 0 4
-4 0
- 6
3-2
2 4
-1
1
0
0 - 2
1 -2
and
D=
3 4
5 -6
EXAMPLE 2
A=
-4 2 5'
6 37
-10 2
s =
~-4 2 5"
"-4 6
6 3 7 +
2 3
2 I -1
5 7
0 2
2 V
- f
(A + A 7 ) = \ (
" - 4 4 2"
4 3 2i
2 27 2_
and
/ " - 4 2 5"
6 3 7
0 2
- 1
"-4 6
2 3
5 7
- f
0
2
-2 3'
2
0 1
" 3 -I 0
DEFINITION
I f A is a square matrix, then the trace of A, denoted by tr(A), is defined to be the sum
o f the entries on the main diagonal o f A. The trace o f A is undefined i f A is not a
square matrix.
E X A M P L E 12 Trace of a Matrix
The following are examples o f matrices and their traces.
p.
a ii
-4 =
f 13
2I
a 22 CI2 3
3I
"32
f 33
-8
-3
_2
-1
1112
B =
tr(Z?) = - l + 5 + 7 + 0 = l l