Matrices and Matrix Operations

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Rectangular arrays of real numbers arise in many contexts other than as

1.3 augmented matrices for systems of linear equations. In this section we


MATRICES AND begin our study of matrix theory by giving some of the fundamental
MATRIX OPERATIONS definitions of the subject. We shall see how matrices can be combined
through the arithmetic operations of addition, subtraction, and multiplication.

Matrix Notation and Terminology

In Section 1.2 we used rectangular arrays of numbers, called augmented matrices, to abbreviate systems of linear
equations. However, rectangular arrays of numbers occur in other contexts as well. For example, the following rectangular
array with three rows and seven columns might describe the number of hours that a student spent studying three subjects
during a certain week:

Mon. Tues. Wed. Thurs. Fri. Sat. Sun.

Math 2 3 2 4 1 4 2

History 0 3 1 4 3 2 2

Language 4 1 3 1 0 0 2
If we suppress the headings, then we are left with the following rectangular array of numbers with three rows and
seven columns, called a “matrix”:

More generally, we make the following definition.

DEFINITION

A matrix is a rectangular array of numbers. The numbers in the array are called the entries in the matrix.

EXAMPLE 1 Examples of Matrices

Some examples of matrices are


The size of a matrix is described in terms of the number of rows (horizontal lines) and columns (vertical lines) it contains.
For example, the first matrix in Example 1 has three rows and two columns, so its size is 3 by 2 (written ). In a size
description, the first number always denotes the number of rows, and the second denotes the number of columns. The
remaining matrices in Example 1 have sizes , , , and , respectively. A matrix with only one column is called
a column matrix (or a column vector), and a matrix with only one row is called a row matrix (or a row vector). Thus,
in Example 1 the matrix is a column matrix, the matrix is a row matrix, and the matrix is both a row
matrix and a column matrix. (The term vector has another meaning that we will discuss in subsequent chapters.)

Remark It is common practice to omit the brackets from a matrix. Thus we might write 4 rather than [4]. Although
this makes it impossible to tell whether 4 denotes the number “four” or the matrix whose entry is “four,” this rarely
causes problems, since it is usually possible to tell which is meant from the context in which the symbol appears.

We shall use capital letters to denote matrices and lowercase letters to denote numerical quantities; thus we might write

When discussing matrices, it is common to refer to numerical quantities as scalars. Unless stated otherwise, scalars will
be real numbers; complex scalars will be considered in Chapter 10.

The entry that occurs in row i and column j of a matrix A will be denoted by . Thus a general matrix might be
written as

and a general matrix as

(1)

When compactness of notation is desired, the preceding matrix can be written as

the first notation being used when it is important in the discussion to know the size, and the second being used when the size
need not be emphasized. Usually, we shall match the letter denoting a matrix with the letter denoting its entries; thus, for a
matrix B we would generally use for the entry in row i and column j, and for a matrix C we would use the notation .

The entry in row i and column j of a matrix A is also commonly denoted by the symbol . Thus, for matrix 1 above,
we have

and for the matrix

we have , , , and .

Row and column matrices are of special importance, and it is common practice to denote them by boldface lowercase letters
rather than capital letters. For such matrices, double subscripting of the entries is unnecessary. Thus a general row
matrix a and a general column matrix b would be written as
, …,
A matrix A with n rows and n columns is called a square matrix of order n, and the shaded entries , in 2 are
said to be on the main diagonal of A.

(2)

Operations on Matrices

So far, we have used matrices to abbreviate the work in solving systems of linear equations. For other applications,
however, it is desirable to develop an “arithmetic of matric es” in which matrices can be added, subtracted, and multiplied
in a useful way. The remainder of this section will be devoted to developing this arithmetic.

DEFINITION

Two matrices are defined to be equal if they have the same size and their corresponding entries are equal.

In matrix notation, if and have the same size, then if and only if , or,
equivalently, for all i and j.

EXAMPLE 2 Equality of Matrices

Consider the matrices

If , then , but for all other values of x the matrices A and B are not equal, since not all of their corresponding
entries are equal. There is no value of x for which since A and C have different sizes.

DEFINITION

If A and B are matrices of the same size, then the sum is the matrix obtained by adding the entries of B to the
corresponding entries of A, and the difference is the matrix obtained by subtracting the entries of B from
the corresponding entries of A. Matrices of different sizes cannot be added or subtracted.

In matrix notation, if and have the same size, then


EXAMPLE 3 Addition and Subtraction

Consider the matrices

Then

The expressions , , , and are undefined.

DEFINITION

If A is any matrix and c is any scalar, then the product is the matrix obtained by multiplying each entry of the matrix A
by c. The matrix is said to be a scalar multiple of A.

In matrix notation, if , then

EXAMPLE 4 Scalar Multiples

For the matrices

we have

It is common practice to denote by .

If , , …, are matrices of the same size and , , …, are scalars, then an expression of the form

is called a linear combination of , , …, with coefficients , , …, . For example, if A, B, and C are the matrices
in Example 4, then
is the linear combination of A, B, and C with scalar coefficients 2, −1, and .

Thus far we have defined multiplication of a matrix by a scalar but not the multiplication of two matrices. Since matrices
are added by adding corresponding entries and subtracted by subtracting corresponding entries, it would seem natural to
define multiplication of matrices by multiplying corresponding entries. However, it turns out that such a definition would
not be very useful for most problems. Experience has led mathematicians to the following more useful definition of matrix
multiplication.

DEFINITION

If A is an matrix and B is an matrix, then the product is the matrix whose entries are determined as
follows. To find the entry in row i and column j of , single out row i from the matrix A and column j from the matrix
B. Multiply the corresponding entries from the row and column together, and then add up the resulting products.

EXAMPLE 5 Multiplying Matrices

Consider the matrices

Since A is a matrix and B is a matrix, the product is a matrix. To determine, for example, the entry
in row 2 and column 3 of , we single out row 2 from A and column 3 from B. Then, as illustrated below, we multiply
corresponding entries together and add up these products.

The entry in row 1 and column 4 of is computed as follows:

The computations for the remaining entries are


The definition of matrix multiplication requires that the number of columns of the first factor A be the same as the number
of rows of the second factor B in order to form the product . If this condition is not satisfied, the product is undefined. A
convenient way to determine whether a product of two matrices is defined is to write down the size of the first factor and, to
the right of it, write down the size of the second factor. If, as in 3, the inside numbers are the same, then the product is
defined. The outside numbers then give the size of the product.

(3)

EXAMPLE 6 Determining Whether a Product Is Defined

Suppose that A, B, and C are matrices with the following sizes:

Then by 3, is defined and is a matrix; is defined and is a matrix; and is defined and is a matrix.
The products , , and are all undefined.

In general, if is an matrix and is an matrix, then, as illustrated by the shading in 4,

(4)

the entry in row i and column j of is given by

(5)

Partitioned Matrices

A matrix can be subdivided or partitioned into smaller matrices by inserting horizontal and vertical rules between selected
rows and columns. For example, the following are three possible partitions of a general matrix A—the first is a partition
of A into four submatrices , , , and ; the second is a partition of A into its row matrices , , and ; and
the third is a partition of A into its column matrices , , , and :
Matrix Multiplication by Columns and by Rows

Sometimes it may be desirable to find a particular row or column of a matrix product without computing the
entire product. The following results, whose proofs are left as exercises, are useful for that purpose:

(6)

(7)

EXAMPLE 7 Example 5 Revisited

If A and B are the matrices in Example 5, then from 6 the second column matrix of can be obtained by the computation

and from 7 the first row matrix of can be obtained by the computation

If , , …, denote the row matrices of A and , , …, denote the column matrices of B, then it follows from
Formulas 6 and 7 that

(8)
(9)

Remark Formulas 8 and 9 are special cases of a more general procedure for multiplying partitioned matrices (see Exercises 15,
16 and 17).

Matrix Products as Linear Combinations

Row and column matrices provide an alternative way of thinking about matrix multiplication. For example, suppose that

Then

(10)

In words, 10 tells us that the product of a matrix A with a column matrix x is a linear combination of the column matrices
of A with the coefficients coming from the matrix x. In the exercises we ask the reader to show that the product of a
matrix y with an matrix A is a linear combination of the row matrices of A with scalar coefficients coming from y.

EXAMPLE 8 Linear Combinations

The matrix product

can be written as the linear combination of column matrices

The matrix product

can be written as the linear combination of row matrices

It follows from 8 and 10 that the jth column matrix of a product is a linear combination of the column matrices of A
with the coefficients coming from the jth column of B.
EXAMPLE 9 Columns of a Product as Linear Combinations

We showed in Example 5 that

The column matrices of can be expressed as linear combinations of the column matrices of A as follows:

Matrix Form of a Linear System

Matrix multiplication has an important application to systems of linear equations. Consider any system of m linear
equations in n unknowns.

Since two matrices are equal if and only if their corresponding entries are equal, we can replace the m equations in
this system by the single matrix equation

The matrix on the left side of this equation can be written as a product to give

If we designate these matrices by A, x, and b, respectively, then the original system of m equations in n unknowns has
been replaced by the single matrix equation

The matrix A in this equation is called the coefficient matrix of the system. The augmented matrix for the system is
obtained by adjoining b to A as the last column; thus the augmented matrix is
Matrices Defining Functions

The equation with A and b given defines a linear system to be solved for x. But we could also write this equation as
, where A and x are given. In this case, we want to compute y. If A is , then this is a function that associates with
every column vector x an column vector y, and we may view A as defining a rule that shows how a given x
is mapped into a corresponding y. This idea is discussed in more detail starting in Section 4.2.

EXAMPLE 10 A Function Using Matrices

Consider the following matrices.

The product is

so the effect of multiplying A by a column vector is to change the sign of the second entry of the column vector. For
the matrix

the product is

so the effect of multiplying B by a column vector is to interchange the first and second entries of the column vector,
also changing the sign of the first entry.

If we view the column vector x as locating a point in the plane, then the effect of A is to reflect the point about the
x-axis (Figure 1.3.1a) whereas the effect of B is to rotate the line segment from the origin to the point through a right
angle (Figure 1.3.1b).
Figure 1.3.1

Transpose of a Matrix

We conclude this section by defining two matrix operations that have no analogs in the real numbers.

DEFINITION

If A is any matrix, then the transpose of A, denoted by , is defined to be the matrix that results from
interchanging the rows and columns of A; that is, the first column of is the first row of A, the second column of
is the second row of A, and so forth.

EXAMPLE 11 Some Transposes

The following are some examples of matrices and their transposes.

Observe that not only are the columns of the rows of A, but the rows of are the columns of A. Thus the entry in row i
and column j of is the entry in row j and column i of A; that is,

(11)

Note the reversal of the subscripts.

In the special case where A is a square matrix, the transpose of A can be obtained by
interchanging entries that are
symmetrically positioned about the main diagonal. In 12 it is shown that can also be
obtained by “reflecting” A about its main diagonal.

(12)

DEFINITION

If A is a square matrix, then the trace of A, denoted by , is defined to be the sum of the
entries on the main diagonal of A. The trace of A is undefined if A is not a square matrix.

EXAMPLE 12 Trace of a Matrix

The following are examples of matrices and their traces.

You might also like