Sie sind auf Seite 1von 46

8

Matrices and Matrix Algebra

Matrices are used throughout mathematics and in related elds such as physics, engineering, economics, and statistics. The algebra of matrices provides a model for the
study of vector spaces and linear transformations.

Introduction
A rectangular array of mathematical expressions is called a pdwul{. A matrix with p
rows and q columns is referred to as an p  q matrix. Matrices are sometimes referred
to simply as duud|v/ and an p  4 or 4  q array is also called a yhfwru.
Entries in matrices can be real or complex numbers, or mathematical expressions
with real or complex coefcients. Most of the choices from the Matrices submenu will
operate on both real and complex matrices. The QR and SVD factorizations discussed
later in this chapter assume real matrices.
Matrix entries are identied by their row and column number. The matrix can be
considered as a function on pairs of positive integers and, if the matrix is given a name,
this feature can be used to retrieve the entries.
5
6
;8 88 6:
83 8 using Dene + New Denition.
Example 66 Dene D @ 7 68 <:
:<
89
7<
Then applying Evaluate yields the following.
D5>6 @ 83
D6>6 @ 7<
Note that the subscripted row and column numbers are separated by a comma.

Changing the Appearance of Matrices


You can make choices in the View menu that affect the appearance of matrices on the
screen. Helper Lines and Input Boxes can be shown or hidden. The default is to
show them to make it easier to handle entries on the screen. However, matrix helper
lines and input boxes may not appear when you preview or print the document. For
this reason, you will generally want to put brackets around matrices. The result of an
operation on matrices generally appears with the same brackets as the original matrices.
The choice of round or square brackets does not affect the mathematical properties of
the matrix. Vertical straight brackets are interpreted as a mathematical operation (called
a determinant) so they should be avoided for general use.

260

Chapter 8 Matrices and Matrix Algebra


L To enclose a matrix in brackets
1. Select the matrix using the mouse or by pressing SHIFT + RIGHT ARROW.
2. Click

Creating Matrices
L To create a matrix
1. Click

or choose Insert + Matrix.

2. Select the number of rows and columns.


3. Click OK.
4. Type in the entries.
The entries can be any valid mathematical expression. Both real and complex numbers are legitimate entries, as well as algebraic expressions.
You can move about in a matrix with the arrow keys, by pressing TAB and BACKTAB,
and by using the mouse. Pressing SPACEBAR will move your insertion point through the
mathematics or out of the matrix.
A 5  5 matrix can be entered from a Windows keyboard with CTRL + A. You can
also create an p  q matrix using Fill Matrix from the Matrices submenu.
L To create a matrix with Fill Matrix
1. From the Matrices submenu, choose Fill Matrix.

2. Set the row and column numbers.

Introduction

261

3. Choose one of the menu items from the dialog box.


4. Click OK.
The matrix will appear inside the brackets, lled with the entries you chose. These
choices are discussed in the next few paragraphs.

Zero
You can get an p  q matrix of all zeroes, for any p and q.
L Matrices + Fill Matrix + Zero


3 3
3 3

Identity
You can get an q  q identity matrix for any q. You can also specify a nonsquare matrix
and choose identity.
L Matrices + Fill Matrix + Identity
5

6
4 3 3
7 3 4 3 8
3 3 4

6
4 3 3 3
7 3 4 3 3 8
3 3 4 3

4
9 3
9
7 3
3

3
4
3
3

6
3
3 :
:
4 8
3

This operation produces a (square) identity matrix as large as possible and lls in
remaining rows or columns, if any, with zeroes.

Random
With this option, you get a matrix lled with random integers between << and <<.
L Matrices + Fill Matrix + Random


;8
88
69 68

Random Matrix
In addition to Fill Matrix, the Matrices submenu contains the entry Random Matrix.
This choice brings up the following dialog.

262

Chapter 8 Matrices and Matrix Algebra

This lets you specify the range for random (integer) entries as well as specify some
special types.
L Matrices + Random Matrix
(66, Unrestricted (respectively Symmetric, Antisymmetric, Triangular), Range
of Random Entries: -10 to 10)
5
6 5
6 5
6 5
6
7 :
;
9 3 43
3 7 :
7 6 43
7 43 9 ; 8 7 3
8
4 8 7 7
3 ; 8 7 3 ;
8 8
8 :
9
43 4
4
: ; 3
3
3
4

Jordan Block
A Mrugdq eorfn is a square matrix with the same expression along the main diagonal,
ones on the superdiagonal, and zeroes elsewhere. The dialog box asks for the number
of rows and columns and for an item for the diagonal. Jordan forms that are built from
Jordan blocks are discussed in more detail later in this chapter.
L Matrices + Fill Matrix + Jordan block
5  5 with  on diagonal and 7  7 with { on diagonal
3
{ 4 3


E 3 { 4
 4
E
C 3 3 {
3 
3 3 3

4
3
3 F
F
4 D
{

Dened by Function
To use the Dened by Function option, rst dene a function i +l> m, of two variables.

Introduction

263

Then use Dened by Function to create the p  q matrix with +l> m, entry equal to
i +l> m, for 4  l  p and 4  m  q.
Example 67 Kloehuw pdwulfhv
Dene i +l> m, @ l.m44 .
From the Fill Matrix dialog, choose Dened by Function.
Type i in the box for the function name.
Set rows and columns to 5 or 6=
Click OK.
6
5
&
%
4 45 46
4
4 5
9 4 4 4 :
7 5 6 7 8
4
4
5

4
6

4
7

4
8

Example 68 Ydqghuprqgh pdwul{


Dene the function j+l> m, @ {ml 4 .
From the Fill Matrix dialog, choose Dened by function.
Enter j for the function name.
Set rows and columns to 7. 5
6
4 {4 {54 {64
9 4 { {5 {6 :
5
9
5
5 :
:
9
7 4 {6 {56 {66 8
4 {7

{57

{67

You can use Fill Matrix to create a general matrix with entries such as dl>m .
Example 69 Dq _duelwudu|% 6  6 pdwul{
Dene the function d+l> m, @ dl>m .
From the Fill Matrix dialog, choose Dened by function.
Enter d for the function name.
Set rows and columns to 6. 5
6
d4>4 d4>5 d4>6
7 d5>4 d5>5 d5>6 8
d6>4 d6>5 d6>6
Note the comma between subscripts. Without the comma in the denition of the
function d +l> m,, the subscript lm would be interpreted as a product! You can use the
following trick to create a general matrix up to <  < with no commas in the subscripts.
Example 70 Dqrwkhu irup iru dq _duelwudu|% 6  6 pdwul{
Dene the function d+l> m, @ d43l.m .
From the Fill Matrix dialog, choose Dened by function.
Enter d for the function name.
Set rows and columns to 6. 5
6
d44 d45 d46
7 d54 d55 d56 8
d64 d65 d66

264

Chapter 8 Matrices and Matrix Algebra


Example 71 Frqvwdqw pdwulfhv
From the Fill Matrix dialog, choose Dened by function.
Enter 8 for the function name.


8 8
8 8

Band
The Band option requires that you enter a list such as d> e> f with an odd number of
entries. This option creates a matrix with a band of entries around the main diagonal,
up to the width of your list, and with zeroes elsewhere. The rst entry will be the item
in the middle of your list.
Example 72 D 5  5 edqg pdwul{
From the Fill Matrix dialog, choose Band.
Type d in the Enter band list box.


d 3
3 d
Example 73 Edqg pdwulfhv
From the Fill Matrix dialog, choose Band.
Type d> e> f in the Enter Band List box.
Set rows to 5 or 8, and columns to 5, 8, or ;.
5
5
6
e f 3 3 3
9
9 d e f 3 3 :


9
9
:
e f
9 3 d e f 3 :
9
9
9
:
d e
7
7 3 3 d e f 8
3 3 3 d e

e f 3 3 3 3 3 3
d e f 3 3 3 3 3
3 d e f 3 3 3 3
3 3 d e f 3 3 3
3 3 3 d e f 3 3

6
:
:
:
:
8

Example 74 Choosing Band and entering the lists 3, 4, and 3> > 4 generates a
zero matrix, an identity matrix, and a Jordan block, respectively.
5
6
5
6
5
6
3 3 3
4 3 3
 4 3
7 3 3 3 8
7 3 4 3 8
7 3  4 8
3 3 3
3 3 4
3 3 

Revising Matrices
Rows, columns, or a block of rows or columns can be deleted from a matrix. The
alignment of rows and columns can be reset. A rectangular block can be replaced.

Introduction

265

Deleting Rows and Columns


L To delete (a block of) rows or columns
1. Select a block of rows or columns by using the mouse.
2. Press DEL.
You can use the procedure described above to delete entries from a rectangular block
of a matrix that does not include a complete row or column.

Adding Rows and Columns


L To add rows or columns of entries
1. Select the matrix by placing the insertion point at the right of the matrix (but not
outside of any brackets) or by placing the insertion point in an empty cell of the
matrix.
2. From the Edit menu, choose Insert Rows or Insert Columns.
3. Make appropriate choices from the dialog box that appears.
The choices Insert Row(s) and Insert Column(s) appear on the Edit menu only
when a matrix is selected. If they do not appear, reposition the insertion point or select
the matrix with click and drag, being careful to select only the inside of the matrixthat
is, not including the exterior Helper Lines.
Tip In the special case of a vector represented as an q  4 or 4  q matrix, you can
lengthen the vector by placing the insertion point in the last input box and pressing
ENTER . You can shorten a vector by placing the insertion point in the last input box and
pressing BACKSPACE. You can start with a display box, or the input boxes that appear
with the fraction, radical, or bracket buttons, and make the same kinds of changes.

Changing Alignment
L To change the alignment of entries
1. Select the matrix using the mouse (or starting with the insertion point at the left of
the matrix, press SHIFT + RIGHT ARROW ).
2. Click the Properties button

3. Make appropriate choices from the dialog box that appears.

266

Chapter 8 Matrices and Matrix Algebra

Replacing a Rectangular Block


You can replace a rectangular block in an existing matrix using Fill Matrix.
L To change a matrix with Fill Matrix
1. Select a rectangular portion of the matrix by using the mouse.
2. Click the Fill Matrix button, or from the Matrices submenu, choose Fill Matrix.
3. Choose one of the items from the dialog box.
4. Click OK.
The selected region of the matrix is lled with the entries that you chose.
Example 75 To change the lower-right 5  5 corner of the matrix
5
6
4 5 6
7 8 8 7 8
: ; <
to the zero matrix,
Select the lower-right 55 corner of the matrix using the mouse. From the Matrices
submenu, choose Fill Matrix. Choose5 Zero.
6
4 5 6
7 8 3 3 8
: 3 3
The lower-right corner is replaced by the 55 zero matrix. No new matrix is created.
You can delete a block of entries in a matrix by selecting a rectangular portion of the
matrix with the mouse, and pressing DEL.
Example 76 To delete the entries in the lower-right 5  5 corner of the matrix
5
6
4 5 6
7 8 8 7 8
: ; <
Select the lower-right 5  5 corner of the matrix using the mouse.
Press DEL to get
5
6
4 5 6
7 8   8
:  

Concatenating Matrices
You can merge two matrices into one if they have the same number of rows.
L To concatenate two matrices

Introduction

267

1. Place two matrices adjacent to each other.


2. Leave the insertion point in one of the matrices.
3. From the Matrices submenu, choose Concatenate.
L Concatenate





4 5
8 9
4 5 8 9
, concatenate:
6 7
: ;
6 7 : ;


{.4
5
6|
7w . 5



8s. z
:}




{.4
5
8s. z
, concatenate:
6|
7w . 5
:}

Reshaping Lists and Matrices


A list of expressions entered in mathematics and separated by commas can be turned
into a matrix where the entries of the matrix, reading left to right and top to bottom, are
the entries of the list in the given order.
L To make a matrix from a list
1. Place the insertion point within the list.
2. From the Matrices submenu, choose Reshape.
3. Specify the number of columns.
The number of rows depends on the length of the list. Extra input boxes at the end
are left blank.
L Reshape
5

6
78 54 ;
78> 54> ;> 4<> 3> 8> 48> 9 to 3 columns: 7 4< 3 8 8
48 9 
A matrix lled with data can be reshaped, with the new matrix corresponding to the
same list as the original data.
L To reshape a matrix
1. Place the insertion point in the matrix.
2. From the Matrices submenu, choose Reshape.

268

Chapter 8 Matrices and Matrix Algebra


3. Specify the new number of columns.
L Reshape


;8 88 6: 68


<:
83
:<
89

6
;8 88 6:
<:
83 8
to 3 columns: 7 68
:<
89


See page 353 for further examples.

Standard Operations
You can perform standard operations on matrices, such as addition, subtraction, and
multiplication, by evaluating expressions entered in natural notation.

Matrix Addition and Scalar Multiplication


You add two matrices of the same dimension by adding corresponding entries. The
numbers or other expressions used as matrix entries are called vfdoduv. You multiply
a scalar with a matrix by multiplying every entry of the matrix by the scalar. You can
do matrix addition and multiplication and other operations with scalars and matrices by
choosing Evaluate. Place the insertion point anywhere inside the expression.
L Evaluate

 
 

4 5
8 9
9 ;
.
@
7 6
; :
45 43
Note that the sum appears with the same brackets as the original matrices.
L Evaluate

 
d44 d45
e44
.
d54 d55
e54

d

d

4 5
7 6
4 5
7 6


@


e

e45
e55

d 5d
7d 6d
8 9
; :


@

d44 . e44
d54 . e54

d45 . e45
d55 . e55


@

d  8e 5d  9e
7d  ;e 6d  :e

Inner Products and Matrix Multiplication


The product of a 4q matrix with an q4 matrix (the product of two vectors) produces

Standard Operations

269

a scalar called the lqqhu surgxfw (sometimes called the grw surgxfw) of the two vectors.
The pdwul{ surgxfw of an pn matrix with a n q matrix is an pq matrix obtained
by taking inner products of rows and columns, the lmth entry of the product DE being
the inner product of the lth row of D with the mth column of E.
L Evaluate




d e

8 9
; :

f
g



d e
x y
4 5
7 6




@ df . eg
f
g

df . eg
xf . yg

8 9
; :


6





@

54 53
77 78

<74 <75
4589 4588

To put an exponent on a matrix, place the insertion point immediately on the right
or choose Insert + Superscript, and type the exponent in the

of the matrix, click


input box.

Identity and Inverse Matrices


The q  q lghqwlw| matrix L has ones down the main diagonal (upper-left corner to
lower-right corner) and zeroes elsewhere. The 6  6 identity matrix, for example, is
5
6
4 3 3
L@7 3 4 3 8
3 3 4
The lqyhuvh of an q  q matrix D is an q  q matrix E satisfying DE @ L. To
nd the inverse of an invertible matrix D, enter D with 4 as a superscript and apply
Evaluate. (As an alternative, leave the insertion point anywhere inside the matrix D,
and from the Matrices submenu, choose Inverse.)
L Evaluate


8 9
; :

4

3
E
@ C

:
46
;
46

4
9
46 F
8 D

46

To check that this matrix satises the dening property, evaluate the product.

270

Chapter 8 Matrices and Matrix Algebra




8 9
; :

E
C

:
46
;
46

4
9


4 3
46 F
@
8 D
3 4

46

The operation Evaluate Numerically gives you a numerical approximation of the


inverse. The accuracy of this numerical approximation depends on properties of the
matrix, as well as on the choices you have made in the Settings menu.
L Evaluate Numerically


8 9
; :

4


@

=86;79
=79487
=9486; =6;795

Checking the product of a matrix with its inverse gives you an idea of the degree of
accuracy of the approximation.
L Evaluate


 

8 9
=86;79
=79487
=<<<<; =33335
@
; :
=9486; =6;795
=33335
=<<<<;

4 @ D4q, you can compute negative powers of invertible matrices.

Since +Dq ,
L Evaluate


8 9
; :
8 9
; :

6
@
6

<74 <75
4589 4588

#
@

<74 <75
4589 4588

 4588
54<:

<75
54<:

4589
54<:

<74
 54<:

 #  4588
54<:
4589
54<:

<75
54<:
<74
 54<:


@

4 3
3 4

 4
The preceding product demonstrates that D6 @ D6
.
The p  q matrix with every entry equal to zero is the lghqwlw| iru dgglwlrq that
is, for any p  q matrix D,
D.3@3.D@D
and the dgglwlyh lqyhuvh of a matrix D is the matrix +4, D.
L Evaluate
5
6 5
d4>4 d4>5
d4>4
7 d5>4 d5>5 8 . 7 d5>4
d6>4 d6>5
d6>4

6 5
6
3 3
d4>5
d5>5 8 @ 7 3 3 8
d6>5
3 3

Standard Operations

271

Polynomials with Matrix Values


You can apply a polynomial function of one variable to a matrix, as in the following
example.
Example 77 A polynomial expression, such as {5  8{  5, can be evaluated at a
matrix.


4 5

Leave the insertion point in the expression { @
, and from the Dene
7 6
submenu, choose New Denition.


Apply Evaluate to the polynomial.

L Evaluate

{5  8{  5 @

5 5
7
3


{5  8{  5{3 @

5 5
7 3

You can also dene the function i +{, @ {5  8{  5 and apply Evaluate (twice) to
get the following.
L Evaluate, Evaluate


5




4 5
4 5
5 5
8
5@
7 6
7 6
7 3


4 5
The expression 8
5 is not, strictly speaking, a proper expression. How7 6


5 3
ever, when evaluated, the 5 is interpreted in this context as
, or twice the 5  5
3 5
identity matrix.


4 5
Another say to evaluate a polynomial at a matrix is to dene the matrix D @
,
7 6
enclose the polynomial in square brackets, and evaluate at { @ D, as in the following
example.
i

4 5
7 6



L Evaluate, Evaluate
 5

{  8{  5 {@D @

4 5
7 6

5


8

4 5
7 6


5@

5 5
7 3

Operations on Matrix Entries


To operate on one entry of a matrix, select the entry, and choose the operation while
holding down the CTRL key. That will perform the operation in place, leaving the rest

272

Chapter 8 Matrices and Matrix Algebra


of the matrix unchanged. Because you are in a word-processing environment, you can
edit individual entries (just click in the input box and then edit) and apply other wordprocessing features to entries, such as copy and paste or click and drag.
Many of the operations on the Maple menu operate directly on the entries when
applied to a matrix, as can be seen from the following examples.
L Factor

 
8 9
8
@
; :
56

56
:

L Evaluate
U 5

 g
 
9{ g{
frv { 5{6
g{5 vlq {
@
g
 {45 7{
g{5 oq { { . 6{
L Evaluate Numerically


vlq5 
oq 8

h
{ . 6{


@

3
5=:4;6
4=93<7 7=3{

L Combine + Trig Functions




vlq5 { . frv5 {
9{5
7 vlq 7{ frv 7{ vlq { frv | . vlq | frv {


@

4
9{5
5 vlq ;{ vlq +{ . |,

L Evaluate


 
{ . 4 5{6  6
4
9{5
g
@
g{ vlq 7{ 6 vhf {
7 frv 7{ 6 vhf { wdq {

Row Operations and Echelon Forms


One of the elementary applications of matrix arrays is storing and manipulating coefcients of systems of linear equations. The various steps that you carry out in applying
the technique of elimination to a system of linear equations
d44 {4 . d45 {5 . = = = . d4q {q @ e4
d54 {4 . d55 {5 . = = = . d5q {q @ e5
..
..
..
.
.
.
dp4 {4 . dp5 {5 . = = = . dpq {q @ ep

Row Operations and Echelon Forms

273

can be applied equally well to the matrix of coefcients and scalars


5
6
d44 d45 = = = d4q e4
9 d54 d55 = = = d5q e5 :
9
:
9 ..
..
..
.. :
7 .
.
===
.
. 8
dp4 dp5 = = = dpq ep
For this and numerous other reasons, you do hohphqwdu| urz rshudwlrqv on matrices.
The goal of elementary row operations is to put the matrix in a special form, such as
a urz hfkhorq irup/ where the number of leading zeroes increases as the row number
increases. The system provides several choices for obtaining a row echelon form , one
of which gives the uhgxfhg urz hfkhorq irup satisfying the following conditions.


The number of leading zeroes increases as the row number increases.

The rst nonzero entry in each nonzero row is equal to 4.

Each column that contains the leading nonzero entry for any row contains only zeroes
above and below that entry.

Gaussian Elimination and Row Echelon Form


The three row echelon forms that can be obtained directly are illustrated in the following
examples.
L Matrices + Fraction-free Gaussian Elimination




d e
d
e
, fraction-free Gaussian elimination:
f g
3 gd  ef


;
5 6
5 8 ;




;
5 6
, fraction-free Gaussian elimination:
3 77 8;

L Matrices + Reduced Row Echelon Form






d e
4 3
, Reduced row echelon form:
f g
3 4


;
5 6
5 8 ;

&
%

64
4 3
77
, Reduced row echelon form:
3 4  5<
55

Elementary Row Operations


You can do elementary row operations by multiplying on the left by appropriate hoh0
phqwdu| pdwulfhv, the matrices obtained from an identity matrix by applying the same

274

Chapter 8 Matrices and Matrix Algebra


elementary row operation as you want to perform on your matrix. The technique is
illustrated in the following examples.
To create an elementary matrix, choose Fill Matrix from the Matrices submenu get
an identity matrix of the appropriate dimension by making choices in the Fill Matrix
dialog box, and perform an elementary row operation by editing the identity matrix.
Choose Evaluate to get the following products.
L Add  times row 6 to row 4
5
65
6 5
6
4 3 
8 5 4
8 .  5 . 7 4 . 
7 3 4 3 8 7 6 9
8
5 8@ 7
6
9
5
3 3 4
4
7
4
4
7
4
L Interchange rows 5 and 6
5

65
6 5
6
4 3 3
83 45 4;
83 45 4;
7 3 3 4 8 7 64 59 95 8 @ 7
4 7: <4 8
3 4 3
4 7: <4
64 59 95
L Multiply row 5 by 
5

65
6 5
6
4 3 3
;3 5 4;
;3
5
4;
7 3  3 8 7 66 59
;5 8 @ 7 66 59
;5 8
3 3 4
47 7: <4
47
7:
<4

Equations
Systems of equations were introduced on page 71. The algebra of matrices provides you
with additional tools for solving systems of linear equations.

Systems of Linear Equations


You identify a system of equations by entering the equations in an q  4 matrix, with
one equation to a row. When you have the same number of unknowns as equations, put
the insertion point anywhere in the system, and from the Solve submenu, choose Exact.
The variables are found automatically without having to be specied, as in the following
example.
L Solve + Exact
{ . |  5} @ 4

5{  7| . } @ 3 , Solution is : { @
5|  6} @ 4

4:
;

>| @

44
;

>} @

8
7

Equations

275

To solve a system of equations with two equations and three unknowns, you must
specify Variables to Solve for in a dialog box. Put the insertion point anywhere in the
matrix and from the Solve submenu, choose Exact. A dialog box comes up asking you
to specify the variables. Enter the variable names, separated by commas.
L Solve + Exact
Variable(s) to Solve for : {> |
5{  | @ 4
, Solution is : i| @ 9} . :> { @ 6} . 7j
{ . 6} @ 7
Variable(s) to Solve for : {> }

5{  | @ 4
, Solution is : { @
{ . 6} @ 7

4
5

. 45 |> } @

:
9


 49 | =

Matrix Equations
The system of equations
d44 {4 . d45 {5 . = = = . d4q {q
d54 {4 . d55 {5 . = = = . d5q {q

@ e4
@ e5
..
.
@ ep

dp4 {4 . dp5 {5 . = = = . dpq {q


is the same as the following matrix equation:
5
65
6 5
d44 d45 = = = d4q
{4
9 d54 d55 = = = d5q : 9 {5 : 9
9
:9
: 9
9 ..
..
.. : 9 .. : @ 9
7 .
8
7
. 8 7
.
===
.

e4
e5
..
.

6
:
:
:
8

{q
ep
dp4 dp5 = = = dpq
You can solve these systems using Exact on the Solve submenu. There are advantages
to solving systems of equations in this way, and often you can best deal with systems
of linear equations by solving the matrix version of the system. Two of the preceding
examples correspond to the rst two of the following matrix equations. Compare these
results with the solutions obtained previously.
5
6
5
6
4
4 5
{
4 8 by the vector 7 | 8
Example 78 Multiply the coefcient matrix 7 5 7
3
5 6
}
{ . |  5} @ 4
to display the system of equations 5{  7| . } @ 3 in matrix form.
5|  6} @ 4
5
65
6 5
6 5
6
4
4 5
{
{ . |  5}
4
7 5 7
4 8 7 | 8 @ 7 5{  7| . } 8 @ 7 3 8
3
5 6
}
5|  6}
4

276

Chapter 8 Matrices and Matrix Algebra


L Solve + Exact
5
65
6 5
6
4
4 5
{
4
9
7 5 7
4 8 7 | 8 @ 7 3 8, Solution is : 7
3
5 6
}
4
5

5 4 3
4
3 6

4:
;
44
;
8
7

6
:
8

6
6
5
 
{
7  6w4
4
7 | 8@
, Solution is : 7 :  9w4 8
7
w4
}
5

5 4 3 4
4
3 6 4

6
{
 
9 | :
9
: @ 4 , Solution is :
7 } 8
7
z

6
7  6w4  w5
9 :  9w4  w5 :
:
9
8
7
w4
w5
5

In the rst case, you can also solve the equation by multiplying both the left and right
sides of the equation by the inverse of the coefcient matrix, and evaluating the product.
L Evaluate
6 5
64 5
6 5
{
4
4 5
4
9
7 | 8 @ 7 5 7
4 8 7 3 8@ 7
}
3
5 6
4
5

4:
;
44
;
8
7

6
:
8

Matrix Operators
A matrix operator is a function that operates on matrices.

Trace
The wudfh of an q  q matrix is the sum of the diagonal elements. This operation applies
to square matrices only.
L To compute the trace of a square matrix
1. Place the insertion point in the matrix.
2. From the Matrices submenu, choose Trace.

Matrix Operators

277

L Trace



d e
, trace: d . g
f g

4
;8 88 6:
C 68 <:
83 D, trace: 94
:<
89
7<

Transpose
The wudqvsrvh of an p  q matrix is the q  p matrix that you obtain from the rst
matrix by interchanging the rows and columns.
L To compute the transpose of a matrix
1. Place the insertion point in the matrix.
2. From the Matrices submenu, choose Transpose.
L Matrices + Transpose


d e
f g




d f
, transpose:
e g

You can also get the transpose of a matrix by using the superscript W .
L Evaluate


d e f
g h i

W

4
d g
@ C e h D
f i

Hermitian Transpose
The Khuplwldq wudqvsrvh of a matrix is the transpose together with the replacement of
each entry by its complex conjugate. It is also referred to as the dgmrlqw or Khuplwldq
dgmrlqw of a matrix (not to be confused with the classical adjoint or adjugate, discussed
elsewhere in this chapter.)
L To compute the Hermitian transpose of a matrix
1. Place the insertion point in the matrix.
2. From the Matrices submenu, choose Hermitian Transpose.

278

Chapter 8 Matrices and Matrix Algebra






d . le f . lg
d  le h  li
, Hermitian transpose:
h . li j . lk
f  lg j  lk





5l 7.l
, Hermitian transpose:
l
5l

5 . l l
7l 5.l

You can also get the Hermitian transpose of a matrix by using the superscript K.
L Evaluate


l 5.l
7l 6  5l

K


@

l
7l
5  l 6 . 5l

Determinant
The ghwhuplqdqw of an q  q matrix +dlm , is the sum and difference of certain products
of the entries. Specically,
[
+4,vjq+, d4+4, d5+5,    dq+q,
ghw+dlm , @


where  ranges over all the permutations of i4> 5> = = = > qj and +4,vjq+, @ 4, depending on whether  is an even or odd permutation.
Note that this operation applies to square matrices only.
L To compute the determinant of a square matrix
1. Place the insertion point in the matrix.
2. From the Matrices submenu, choose Determinant.
L Matrices + Determinant


d e
f g

d4>4
7 d5>4
d6>4
5


, determinant: dg  ef
d4>5
d5>5
d6>5

6
d4>6
d5>6 8, determinant:
d6>6

d4>4 d5>5 d6>6  d4>4 d5>6 d6>5  d5>4 d4>5 d6>6


.d5>4 d4>6 d6>5 . d6>4 d4>5 d5>6  d6>4 d4>6 d5>5

6
;8 88 6:
7 68
<:
83 8, determinant: 45485<
:<
89
7<

Matrix Operators

279

You can denote the determinant by


5
6
;8 88 6:
<:
83 8
ghw 7 68
:<
89
7<
where det is typed while in mathematics mode. This string is a multicharacter function
name. When typed in mathematics, it turns gray when the w is typed. This function
can also be chosen from the list under

. You can also denote the determinant by

enclosing the matrix in vertical brackets from the expanding brackets list under

L Evaluate

ghw

d e
f g


 d e

 f g


@ dg  ef



 @ dg  ef


6
d4>4 d4>5 d4>6
ghw 7 d5>4 d5>5 d5>6 8 @ d4>4 d5>5 d6>6 d4>4 d5>6 d6>5 d5>4 d4>5 d6>6 .d5>4 d4>6 d6>5 .
d6>4 d6>5 d6>6
d6>4 d4>5 d5>6  d6>4 d4>6 d5>5
5

6
;8 88 6:
7 68
<:
83 8, determinant: 45485<
:<
89
7<



 ;8 88 
 @ 43 4:3

 68
<: 

Adjugate
The adjugate or classical adjoint of a matrix D is the transpose of the matrix of cofactors
l.m
of D. The l> m cofactor Dlm of D is the scalar +4, ghw D +lmm,, where D +lmm, denotes
the matrix that you obtain from D by removing the lth row and mth column.
L Matrices + Adjugate


d e
f g



, adjugate:

g e
f
d

Note The product of a matrix with its adjugate is diagonal, with the entries on the
diagonal equal to the determinant of the matrix.





d e
g e
dg  ef
3
@
f g
f
d
3
dg  ef

280

Chapter 8 Matrices and Matrix Algebra


L Matrices + Adjugate
5

6
5
6
<
9
: 8
66;7
79< 64;6
:463
9 7 ; 6 <5 :
9
634 6533 ;486 :
9
:, adjugate: 9 665<
:
7 6 9
8
7
:
9
739; 594
9;<9 5<:9 8
8 8
3 4
5:8
;73
;8 4449
L Evaluate
5
<
9
: 8
9 7 ; 6 <5
9
7 6 9
:
9
8 8
3 4
5

65

6
66;7
79< 64;6
:463
: 9 665<
634 6533 ;486 :
:9
:
8 7 739; 594
9;<9 5<:9 8
5:8
;73
;8 4449
6
::864
3
3
3
9 3
::864
3
3 :
:
@9
7 3
3
::864
3 8
3
3
3
::864

6
<
9
: 8
9 7 ; 6 <5 :
: @ ::864
ghw 9
7 6 9
:
9 8
8 8
3 4

Note The relationship just demonstrated gives a formula for the inverse of an invertible matrix D.
4
dgmxjdwh D
D4 @
ghw D

Permanent
The shupdqhqw of an q  q matrix +dlm , is the sum of certain products of the entries.
Specically,
[
permanent+dlm , @
d4+4, d5+5,    dq+q,


where  ranges over all the permutations of i4> 5> = = = > qj. This operation applies to
square matrices only.
L To compute the permanent of a matrix
1. Place the insertion point in the matrix.

Matrix Operators

281

2. From the Matrices submenu, choose Permanent.


L Matrices + Permanent


d e
f g

d4>4
7 d5>4
d6>4


, permanent: dg . ef
d4>5
d5>5
d6>5

6
d4>6
d5>6 8, permanent:
d6>6

d4>4 d5>5 d6>6 . d4>4 d5>6 d6>5 . d5>4 d4>5 d6>6


.d5>4 d4>6 d6>5 . d6>4 d4>5 d5>6 . d6>4 d4>6 d5>5

Maximum and Minimum Matrix Entries


The functions pd{ and plq applied to a matrix with integer entries will return the entry
with maximum or minimum value.
L Evaluate
5

6
;8 88 6: 68 <:
:<
89
7<
96 8 @ <:
pd{ 7 83
8: 8< 78
; <6
5

6
<5
76 95 ::
99
9 87
8
<< 94 83 :
:
plq 9
7 45 4; 64 59 95 8 @ <4
4
7: <4 7: 94

Matrix Norms
Choosing Norm from the Matrices submenu gives the 5-norm of a vector or matrix.
The 20qrup, or Hxfolghdq qrup, of a vector is the Euclidean length of the vector.
 
 d 
  s
  s
 e 
 d 
  @ d5 . e5 . f5 . g5
  @ d5 . e5
 f 
 e 
 
 g 
The 50qrup, or Hxfolghdq qrup, of a matrix D is its largest singular valuethe number
dened by
nD{n
nDn @ pd{
{9@3 n{n

282

Chapter 8 Matrices and Matrix Algebra


L Matrices + Norm


4
5 4
3
s
C 4
5 4 D, 2-norm: 5 . 5
3 4
5


s
s
5 6
, 2-norm: 45 ;< . 45 ;8
8 :
5 . 6l
8
9
: . 5l


s
s
, 2-norm: 45 587 . 5 7<:6

You obtain a numerical approximation if at least one entry is in oating-point form.


L Matrices + Norm


=5 =6
=8 =:


, 2-norm: =<659;

The 2-norm of a matrix can also be obtained with double brackets.


L To put norm symbols around a matrix

1. Select the matrix by using the mouse or by pressing SHIFT + RIGHT ARROW.
2. Click

or choose Insert + Brackets. Select the norm symbols. Choose Ok.

L Evaluate

 =5 =6

 =8 =:



 @ = <65 9;



 5 . 6l
8

 9
: . 5l



 8
s
s
: 
4
 4

 46 9  @ 5 854 . 5 6:


 4s
s
@
 5 587 . 5 7<:6

The 40qrup of a matrix is the maximum among the sums of the absolute values of
the terms in a column:
$
# q
[
nDn4 @ pd{
mdlm m

mq

l@4

Matrix Operators
L Evaluate

 d e

 f g

283



 =5567 =648; 


 =8957 =:444  @ 4= 359 <
4



 @ pd{ +mdm . mfm > mem . mgm,

4



 8
: 


 46 9  @ 4;
4


 8 . 6l
:

 46 9  8l



s
 @ 67 . 46

4

The 4-qrup of a matrix is the maximum among the sums of the absolute values of
the terms in a row:
4
3
q
[
mdlm mD
nDn4 @ pd{ C

lq

L Evaluate

 d e

 f g






@ pd{ +mdm . mem > mfm . mgm,



 8
: 


 46 9  @ 4<
4

m @4



 =5567 =648; 


 =8957 =:444  @ 4= 5:6 8
4


 8 . 6l
:

 46 9  8l






@ 46 .

s
94

The Kloehuw0Vfkplgw qrup (or Iurehqlxv qrup) nDnI of a matrix D is the square
root of the sums of the squares of the terms of the matrix D.
4 45
3
F
E [
mdlm m5 D
nDnI @ C
4m q
4lq

L Evaluate



 8 . 6l
s
:


 46 9  8l  @ 646
I



 8
s
:


 46 9  @ 6 64
I










u


d e 
5
5
5
5
 @
mdm
.
mem
.
mfm
.
mgm
f g I

=5567 =648; 
 @ = <;8 9<
=8957 =:444 I

Condition Number
The frqglwlrq qxpehu of an invertible matrix D is the product of the 5-norm of D and
the 5-norm of D4 . This number measures the sensitivity of some solutions of linear

284

Chapter 8 Matrices and Matrix Algebra


equations D{ @ e to perturbations in the entries of D and e. The matrix with condition
number 4 is perfectly conditioned.
L Matrices + Condition Number
5

6
3 4 3
7 3 3 4 8, condition number: 4
4 3 3
5

6
8 8 6
7 6
3
8 8, condition number: 5=;57<
4
8
7
5

6
5 4
3
3
8 4s  6 4s 
9 4
5 4
3 :
9
:, condition number: 5 . 5 8 5 . 5 8
7 3 4
5 4 8
@ <=7:547
3
3 4
5
5
9
9
9
7


4
4
5
4
6
4
7

4
5
4
6
4
7
4
8

4
6
4
7
4
8
4
9

4
4
4 4=33334

4
7
4
8
4
9
4
:

6
:
:
:, condition number: 48847
8


, condition number: 733335

These nal two matrices are extremely ill-conditioned. Small changes in some entries of D or e may result in large changes in the solution to linear equations of the form
D{ @ e in these two cases.

Exponential Functions
The most natural way to dene hP is to imitate the power series for h{ =



h{ @ 4 . { . 45 {5 . 49 {6 .

4
57
6

{7 .   

hP @ 4 . P . 45 P 5 . 49 P .

4
57

P7 .   

In general,
hwP @

4 +wP ,n
[
n$

n@3
To evaluate the expression hP for a matrix P , leave the insertion point in the expression

Polynomials and Vectors Associated With a Matrix

285

hP and choose Evaluate, as shown in the following examples. First dene


5
6
5
6




3 4 3
4 6 3
4 5
4 5
D@
,E@
, F @ 7 3 3 4 8, G @ 7 3 4 3 8
3 6
3 4
3 3 3
3 3 4
L Evaluate
%

h . 46 h8 46 h8  46 h4
h  56 h4 46 h4 . 56 h8
 5

h 5h7  5h5
hD.E @
3
h7
5
6
4 w 45 w5 . 6w
8
GhwF G4 @ 7 3 4
w
3 3
4

hD @

5
4
6
5 8
6

&
hwD @

h . 46 h8w
h  56 hw

5
w
6
5 8w
6

h  46 hw
h . 56 h8w

4 8w
6
4
w
6

&

h5 h5 . h7
3
h7
5
6
4 w 45 w5 . 6w
4
8
hGwFG @ 7 3 4
w
3 3
4

hD hE @

Note that one of the properties of exponents that holds for real numbers fails for
matrices. The equality hD.E @ hD hE requires that DE @ ED, and this property fails
to hold for the matrices in the example. However, exponentiation preserves the property
4
of similarity, as demonstrated by GhwF G4 @ hGwFG .

Polynomials and Vectors Associated With a Matrix


A square matrix has characteristic and minimum polynomials, eigenvalues and eigenvectors.

Characteristic Polynomial and Minimum Polynomial


The fkdudfwhulvwlf sro|qrpldo of a square matrix D is the determinant of the characteristic matrix {L  D.
L Matrices + Characteristic Polynomial
3

4
7 4 3
C 3 7 3 D, characteristic polynomial: +[  7,6
3 3 7

286

Chapter 8 Matrices and Matrix Algebra


L Evaluate
3

4 3
4 3
4 3 3
7 4 3
7 . [
3
[C 3 4 3 DC 3 7 3 D@ C
3 3 4
3 3 7
3
3

7 . [
ghw C
3
3

4
7 . [
3

4
7 . [
3

4
3
D
3
7 . [

4
3
D @ +[  7,6
3
7 . [

The plqlpxp sro|qrpldo of a square matrix D is the monic polynomial s+{, of


smallest degree such that s+D, @ 3. By the CayleyHamilton theorem , i +D, @ 3 if
i +{, is the characteristic polynomial of D. The minimum polynomial of D is a factor of
the characteristic polynomial of D.
L Matrices + Minimum Polynomial, Factor
3

4
7 4 3
C 3 7 3 D, minimum polynomial: 49  ;[ . [ 5 @ +[  7,5
3 3 7

Example 79 This example illustrates the CayleyHamilton theorem.


3
4
7 4 3
Dene s+[, @ [ 5  ;[ . 49 and D @ C 3 7 3 D.
3 3 7
With Maple, apply Evaluate twice to get the following.
3
4
3 3 3
s+D, @ D5  ;D . 49 @ C 3 3 3 D
3 3 3
The minimum and characteristic polynomial operations have to return a variable for
the polynomial. In the preceding examples, they returned [. However, the variable used
depends on the matrix entries and you do not need to avoid [ in the matrix. This point
is illustrated in the following examples.
L Matrices + Minimum Polynomial


6[
8

[

{
|
{
|


, minimum polynomial: 8{ . 6[| . +6[  |,  . 5

, characteristic polynomial: 5  +| . ,  . |  {[

Polynomials and Vectors Associated With a Matrix

287

Eigenvalues and Eigenvectors


Given a matrix D, the matrix commands Eigenvectors and Eigenvalues on the Matrices submenu nd scalars f and nonzero vectors y for which Dy @ fy. If there is a
oating-point number in the matrix, you get a numerical solution. Otherwise, you get
an exact symbolic solution.
These scalars and vectors are sometimes called fkdudfwhulvwlf values and fkdudf0
whulvwlf vectors. The eigenvalues, or characteristic values, are roots of the characteristic
polynomial.
L Matrices + Eigenvalues


frv   vlq 
vlq 
frv 


, eigenvalues: frv  . l vlq > frv   l vlq 

This matrix has characteristic polynomial [ 5  5[ frv  . 4. Replacing [ by the


eigenvalue frv  . l vlq  and applying Simplify gives
5
+frv  . l vlq ,  5 +frv  . l vlq , frv  . 4 @ 3
demonstrating that eigenvalues are roots of the characteristic polynomial. Note the different results obtained using integer versus oating-point entries.
L Matrices + Eigenvalues


4 5
6 7


, eigenvalues:

4=3 5
6 7

8
5

4
5

66> 85 

4
5

s
66


, eigenvalues: =6:55;> 8=6:56

When you choose Eigenvectors from the Matrices submenu, with each eigenvector,
you get the corresponding eigenvalue. These eigenvectors are grouped by eigenvalues,
and the multiplicity for each eigenvalue is indicated.
L Matrices + Eigenvectors


4 5
6 7



, eigenvectors:

4
6


4

7
6


'  where  is a root of ] 5  8]  5

In the preceding example,  denotes an eigenvalue, and 4 indicates that eigenvalues


multiplicity as a root of the characteristic polynomial. The
s roots of thespolynomial
] 5  8]  5 are the eigenvalues computed earlier: 85 . 45 66 and 85  45 66=
s
For  @ 85 45 66, the corresponding eigenvector is

 
 

4s 
4s
4

@
@
4
4 8
6
  45
45 66  45
47 66
5
5 5
7
The products of the matrix with these eigenvectors and eigenvalues are as follows.

288

Chapter 8 Matrices and Matrix Algebra


L Evaluate


4 5
6 7



6.

4 5
6 7



66

s66 

8.

4s

4s

4s

6.

9.



@


s66

4s

s
66
8
5

s66

9
66

>

s 
. 45s 66
9 . 66

66

66

s66

8.

s
66

>


@

s 
 45s 66
9  66

8
5

Thus, both roots give an eigenvalueeigenvector pair.


L Matrices + Eigenvectors
;3 4 3 4<
4
8 9 9
5 @
? 5
C 4
7
5 D, eigenvectors: C 3 D > C 4 D ' 5>
=
>
6 9 7
4
3
3

;3
4<
? 6 @
C 4 D '4
=
>
6
In the preceding example, 5 is an eigenvalue occurring with multiplicity 5, and 4 is
an eigenvalue occurring with multiplicity 4. The dening property Dy @ fy is illustrated
by the following.
L Evaluate
3
8 9
C 4
7
6 9
3
8 9
C 4
7
6 9

43
9
5 DC
7
43
9
5 DC
7

4 3
5
4 D@C
3
4 3
5
3 D@ C
4

4
7
5 D,
3
4
7
3 D>
5

4 3 4
5
7
5C 4 D@C 5 D
3
3
3 4 3 4
5
7
5C 3 D @ C 3 D
4
5

Positive Denite Symmetric Matrices


A symmetric matrix D is srvlwlyh ghqlwh if any of the following equivalent conditions
hold: all the eigenvalues of D are positive the product {W D{ A 3 for all nonzero vectors
{ or there exists a nonsingular matrix Z such that D @ Z W Z .

Vector Spaces Associated With a Matrix

289

A symmetric matrix D is srvlwlyh vhplghqlwh if all the eigenvalues of D are


nonnegative, is qhjdwlyh ghqlwh if all the eigenvalues are negative, and is qhjdwlyh
vhplghqlwh if all the eigenvalues are nonpositive.
L Matrices + Deniteness Tests


5 4
4 5

4 4
4 4


, eigenvalues: 6> 4>

qhjdwlyh ghqlwh> false


qhjdwlyh vhplghqlwh> false
srvlwlyh vhplghqlwh> true
srvlwlyh ghqlwh> true


, eigenvalues: 3> 5>

qhjdwlyh ghqlwh> false


qhjdwlyh vhplghqlwh> false
srvlwlyh vhplghqlwh> true
srvlwlyh ghqlwh> false

Vector Spaces Associated With a Matrix


There are four vector spaces naturally associated with an p  q matrix D: the row
space, the column space, and the left and right nullspaces. A edvlv for a vector space is
a linearly independent set of vectors that spans the space.

The Row Space


The urz vsdfh is the vector space spanned by the row vectors of D.
L To nd a basis for the row space
1. Leave the insertion point in the matrix.
2. From the Matrices submenu, choose Row Basis=
L Matrices + Row Basis
5
6
;8 88 6: 68
9 <:
83
:<
89 :
9
:, row basis:
7 7<
96
8: 8< 8
69
;
53 <7
 
 


:737<
63;8
46666:
> 3 4 3 
> 3 3 4 
4 3 3
9;597
67465
<:85
You can nd other bases for the row space by choosing Reduced Row Echelon
Form from the Matrices submenu, or by applying Fraction-Free Gaussian Elimination and then taking the nonzero rows from the result.

290

Chapter 8 Matrices and Matrix Algebra


L Matrices + Reduced Row Echelon Form
5

;8 88 6: 68


9 <:
83
:<
89
9
7 7<
96
8: 8<
69
;
53 <7

9 4 3
9
9
:
3 4
:, row echelon form: 9
9
8
9
9
7 3 3
3 3
6

46666:
9;597
:737<
3 
67465
63;8
4 
<:85
3
3
3

6
:
:
:
:
:
:
:
8

The preceding calculation gives the same basis as found in the previous example.
L Matrices + Fraction-free Gaussian Elimination
5
6
;8 88 6: 68
9 <:
83
:<
89 :
9
:, fraction-free Gaussian elimination:
7 7<
96
8: 8< 8
69
;
53 <7
5
6
;8 88
6:
68
9
3 43;8 6459 4698 :
9
:
7
3
3 46985; 764<3 8
3
3
3
3
The nonzero rows in the preceding matrix give a basis for the row space:

 

;8 88 6:
68 , 3 43;8 6459
4698 ,


3 3 46985; 764<3 .

The Column Space


The froxpq vsdfh is the vector space spanned by the columns of D.
L To nd a basis for the column space
1. Leave the insertion point in the matrix.
2. From the Matrices submenu, choose Column Basis.
L Matrices + Column Basis
5
6
;8 88 6: 68
9 <:
83
:<
89 :
9
:, column basis:
7 7<
96
8: 8< 8
69
;
53 <7

6 5
3
4
9 4 : 9 3
9 :>9
7 3 8 7 3
3
4

6 5

6
3
: 9 3 :
:>9 :
8 7 4 8
4

Vector Spaces Associated With a Matrix

291

You can also take the transpose of D and apply Fraction-Free Gaussian Elimination to the result, because the column space of D is the row space of DW .

The Left and Right Nullspaces


The (right) qxoovsdfh is the vector space consisting of all q  4 vectors [ satisfying
D[ @ 3. You nd a basis for the nullspace by choosing Nullspace Basis from the
Matrices submenu.

L Matrices + Nullspace Basis


5
5

6
;8 88 6: 68
9 <:
83
:<
89 :
9
:, nullspace basis:
7 7<
96
8: 8< 8
69
;
53 <7

9
9
9
9
9
9
9
7

46666:
9;597
:737<
67465
63;8
<:85
4

6
:
:
:
:
:
:
:
8

The ohiw qxoovsdfh is the vector space consisting of all 4  p vectors \ satisfying
\ D @ 3. You nd a basis for the left nullspace by rst taking the transpose of D and
then choosing Nullspace Basis from the Matrices submenu.
L Evaluate
5

6W 5
;8 88 6: 68
;8
9 <:
9 88
:
83
:<
89
9
: @9
7 7<
7 6:
96
8: 8< 8
69
;
53 <7
68

6
<: 7< 69
83 96
; :
:
:< 8:
53 8
89 8< <7

L Matrices + Nullspace Basis


5

;8
9 88
9
7 6:
68

6
<:
7< 69
83
96
; :
:, nullspace basis:
:<
8:
53 8
89 8< <7

;5
A
A
?9
9
7
A
A
=

6<
4 A
A
@
3 :
:
4 8A
A
>
4

To check that this vector is in the left nullspace, take the transpose of the vector and
check the product.

292

Chapter 8 Matrices and Matrix Algebra


L Evaluate
5

6W 5
4
;8 88 6: 68
9 3 : 9 <:
83
:<
89
9
: 9
7 4 8 7 7<
96
8: 8<
4
69
;
53 <7

6
: 

:@ 3 3 3 3
8

The QR Factorization and Orthonormal Bases


Any real matrix D with linearly independent columns can be factored as a product
TU, where the columns of T are ruwkrqrupdo (the inner product of any two different columns is 3, and the inner product of any column with itself is 4) and U is invertible
and upper-right triangular. If the original matrix D is square, then so is T. In this case,
T is an ruwkrjrqdo matrix.
L To obtain the TU factorization
1. Leave the insertion point in a matrix.
2. From the Matrices submenu, choose QR Decomposition.
L Matrices + QR Decomposition


6 3
7 8


@

=9 =;
=; =9



8=3 7=3
3
6=3

The two matrices T and D @ TU have the same column spaces. Observe, in the
following example, that the columns of D are linear combinations of the columns of T.
Then, since both column spaces have dimension 5 and one contains the other, it follows
that they must be the same space.

Example 80 The preceding product comes from the following linear combinations.




 
=9
=;
6
@ 8
.3
=;
=9
7



 

and
=;
3
=9
6
@ 7
=9
8
=;
This conversion of the columns of D into the orthonormal columns of T is referred
to as the Judp~Vfkplgw ruwkrjrqdol}dwlrq process. In general, since U is upper-right
triangular, the subspace spanned by the rst n columns of the matrix D @ TU is the
same as the subspace spanned by the rst n columns of the matrix T.

Special Forms of Matrices

293

Rank and Dimension


The udqn of a matrix is the dimension of the column space. It is the same as the dimension of the row space or the number of nonzero singular values.
L Matrices + Rank
5
6
; 8
: 5
9 :
8
<
8 :
9
:, rank: 5
7 4
3 49 6 8
;
8 :
5
L Matrices + Row Basis
5
; 8
: 5
9 :
8
<
8
9
7 4
3 49 6
;
8 :
5

6
:

 
:, row basis:
4 3 49 6 > 3 4
8

L Matrices + Column Basis


5
6
; 8
: 5
9 :
8
<
8 :
9
:, column basis:
7 4
3 49 6 8
;
8 :
5

6 5
3
4
9 4 : 9 3
9
: 9
7 4 8 > 7 4
3
4

454
8

59
8

6
:
:
8

Special Forms of Matrices


Several normal forms of matrices can be obtained.

Smith Normal Form


Two q  q matrices D and E are htxlydohqw if one can be obtained from the other by
a sequence of elementary row and column operations. In other words, E @ TDS for
some invertible matrices T and S .
Any matrix D with polynomial entries is equivalent to a diagonal matrix of the
form gldj+4> = = = > 4> s4 > s5 > = = = > sn > 3> = = = > 3,, where 3  ghj+s4 ,  ghj+s5 ,  = = = 
ghj+sn , and for each l, sl is a factor of sl.4 . This matrix, which is uniquely determined
by D, is called the Vplwk qrupdo irup of D. Two square matrices with polynomial
entries are equivalent if and only if they have the same Smith normal form.

294

Chapter 8 Matrices and Matrix Algebra


L Matrices + Smith Normal Form
 6

{ . 6{  4 {5  6{ . 8
D@
{7 . 6{5
{6 . 8{5


4
3
Smith normal form:
3 {: . 8{8  6{7 . 4<{6  5;{5

E@





{6 . 6{  4 {5  6{ . 8
;8 88
,
{7 . 6{5
6: 68
{6 . 8{5


4
3
Smith normal form:
3 {: . 8{8  6{7 . 4<{6  5;{5

<: 83
:< 89

Two q  q matrices D and E are vlplodu if there is an invertible q  q matrix F


such that E @ F 4 DF.
Example 81 Two matrices are similar if and only if their characteristic matrices {L D
and {L  E are equivalent, which is the same as saying that {L  D and {L  E have the
same Smith
 normal
 form. To demonstrate this relationship, take two similar matrices.
4 5
D@
6 7
6
5
64<
94

4 



4 <
4 5
4 <
9
64 :
E@
@ 7 64
57
<7 8
6 7
6 7
6 7

64
64
These matrices
matrices
 havethe following characteristic

{ 3
4 5
{  4 5
{L  D @

@
3 {
6 7
6 {  7
6 5
6
5
64<
64<
94
94



{

{ 3
9
9
64 :
64
64 :
{L  E @
 7 64
@
57
<7 8
<7 8 7 57
3 {

{
64
64
64
64
with Smith normal forms both equal to


4
3
3 {5  8{  5

Rational Canonical Form


The frpsdqlrq pdwul{ of a monic polynomial d3 . d4 [ .    . dq4 [ q4 . [ q of
degree q is the q  q matrix with a subdiagonal of ones, nal column
W

d3 d4    dq4

Special Forms of Matrices

295

and other entries zero.


L Polynomials + Companion Matrix
5

3
9
4
{7 . 6{5  5{ . 4, Companion matrix: 9
7 3
3

3
3
4
3

6
3 4
3 5 :
:
3 6 8
4 3

6
3 3 f
{6 . d{5 . e{ . f, Companion matrix: 7 4 3 e 8
3 4 d
Note that the rst of the following matrices is the companion matrix of its own characteristic and minimum polynomials.

L Matrices + Minimum Polynomial


3
E
E
E
E
C

3
4
3
3
3

3
3
4
3
3

4
3 d
3 e F
F
3 f F
F, minimum polynomial:
3 g D
4 h

3
3
3
4
3

d . e[ . f[ 5 . g[ 6 . h[ 7 . [ 8
Choosing Rational Canonical Form from the Matrices submenu produces a factorization of a square matrix as S I S 4 , where I is in rational canonical form. A udwlrqdo
fdqrqlfdo irup, sometimes called a Iurehqlxv irup, is a block diagonal matrix with
each block the companion matrix of its own minimum and characteristic polynomials.
Each of the minimum polynomials of these blocks is a factor of the characteristic polynomial of the original matrix. The polynomials that determine the blocks of the rational
canonical form sequentially divide one another.
L Matrices + Rational Canonical Form
5

5
4 5 6
4 4 63
3 3 3 9
4:
7 7 8 9 8 @ 7 3 7 99 8 7 4 3 4; 8 9
9 3 <
: ; <
3 : 435
3 4 48 7
:
3
87
5

65

4
44
<
5

5:

6
:
:
:
8

Notice that the rational canonical form in the preceding example is the companion
matrix of its minimum polynomial [ 6  48[ 5  4;[. Now look at the companion
matrix of this same matrix.

296

Chapter 8 Matrices and Matrix Algebra


L Evaluate
3

4 5
6 5
6
4 3 3
4 5 6
{  4 5
6
{ C 3 4 3 D  7 7 8 9 8 @ 7 7 {  8 9 8
3 3 4
: ; <
:
; {  <
L Matrices + Smith Normal Form
5

6
5
6
{  4 5
6
4 3
3
7 7 {  8 9 8, Smith normal form: 7 3 4
8
3
5
6
:
; {  <
3 3 4;{  48{ . {
The polynomial occurring in the preceding Smith normal form has its coefcients
displayed in the rational canonical form shown previously.

L Matrices + Rational Canonical Form


5

6 5
65
65
6
8 9 9
4
8 5
3 5 3
4 4 5
7 4
7
5 8 @ 7 3 4 3 8 7 4
6 3 8 7 3 4
3 8
6 9 7
3
6 4
3
3 5
3
6
4
There are two blocks in the preceding rational canonical form:

1. The companion matrix

3 5
4 6


of [ 5  6[ . 5 @ +[  4, +[  5,

2. The companion matrix ^ 5 ` of [  5


L Matrices + Characteristic Polynomial, Factor
5

6
8 9 9
7 4
7
5 8, characteristic polynomial:
6 9 7
[ 6 . ;[  8[ 5  7 @ +[  4, +[  5,5
L Matrices + Minimum Polynomial, Factor
5

6
8 9 9
7 4
7
5 8, minimum polynomial: 5  6[ . [ 5 @ +[  4, +[  5,
6 9 7

Special Forms of Matrices

297

The characteristic matrix {L  D of the preceding matrix D is


5
6 5
6 5
6
4 3 3
8 9 9
{8
9
9
7
5 8@ 7
4
{  7 5 8
{ 7 3 4 3 8  7 4
3 3 4
6 9 7
6
9
{.7
L Matrices + Smith Normal Form
5

6
5
6
{8
9
9
4
3
3
7 4
8
{  7 5 8, Smith normal form: 7 3 {  5
3
5
6
9
{.7
3
3
5  6{ . {
These two examples illustrate a relationship among the Smith normal form, the characteristic matrix, and the rational canonical form of a matrix.
Note The Smith normal form of the characteristic matrix of D displays the factors of
the characteristic polynomial of D that determine the rational canonical form of D=

Jordan Form
Choosing Jordan Form from the Matrices submenu produces a factorization of a
square matrix as S MS 4 , where M is in Jordan form. This form is a block diagonal
matrix with each block an elementary Jordan matrix. More specically, the Mrugdq
irup of an q  q matrix D5is a matrix of the form
6
Mq4 +4 ,
3

3
9
:
3
3
Mq5 +5 ,   
9
:
M+D, @ 9
:
..
..
.
.
.
.
7
8
.
.
.
.
3
3
   Mqn +n ,
where q4 .q5 .  .qn @ q, and each diagonal block Mql +l , is an ql ql hohphqwdu|
Mrugdq pdwul{ of the form
5
6
l 4    3 3
9 3 l    3 3 :
9
:
9
.. . .
..
.. :
Mql +l , @ 9 ...
. .
.
. :
9
:
7 3 3    l 4 8
3 3    3 l

298

Chapter 8 Matrices and Matrix Algebra


L Matrices + Jordan Form
5

6
5 4
3
7 4
5 4 8 @
3 4
5
5

4
5

9
7 3
 45

65 5
3
3
9
s
s
s
:
4
3
5  5 89
7
7 3 5 5
s
4
3
3
5. 5
7
4
7

4
7
4
7
4
7

65

6
3
4
:9
:
s
:9 4
5
4 :
87
8
s
4  5 4
4

Thus, the Jordan form is


35
64 5
6
5
3s
3
5 4
3
5 4 8D @ 7 3 5  5
3s 8
M C7 4
3 4
5
3
3
5. 5
In this case, M+D, is diagonal, so each Mql +l , is a 4  4 matrix. The matrix
3
4
5 4
3
5 4 D
D @ C 4
3 4
5
has characteristic and minimum polynomials

s 
s 
7 . 43[  9[ 5 . [ 6 @ +[  5, [  5  5 [  5 . 5
s
s

whose roots 5> 5 . 5> 5  5 are the diagonal entries of the Jordan form.
L Matrices + Jordan Form
5

5
9 4
9
7 3
3

3 3
5 3
3 5
3 6

6 5
3
3 4 3
9 4 3 3
3 :
:@ 9
3 8 7 3 3 3
5
3 3 6

Thus, the Jordan form


35 is
5
E9 4
9
ME
C7 3
3

65
3
5 4
9 3 5
3 :
:9
4 87 3 3
3
3 3

3
3
5
3

65
3
3 4
9 4 3
3 :
:9
4 87 3 3
3 3
5

6
3 3
3 3 :
:
3  46 8
4 3

64 5
6
3
5 4 3 3
F 9
:
3 :
:F @ 9 3 5 3 3 :
8
D
7
3
3 3 5 4 8
5
3 3 3 5


5 4
, the companion matrix of the miniIn this case, Mq4 +4 , @ Mq5 +5 , @
3 5
mum polynomial of
5
6
5 3 3 3
9 4 5 3 3 :
:
D@9
7 3 3 5 3 8
3 3 6 5
7
The matrix D has characteristic polynomial +[  5, with roots i5> 5> 5> 5j, and min5
imum polynomial [ 5  7[ . 7 @ +[  5, .
3 3
5 3
3 5
3 6

Special Forms of Matrices


L Matrices + Jordan Form
5
6
5
5 3 3 3
4
9 3 5 3 3 :
9
9
: @ 9 3
7 3 3 5 3 8
7 3
3 3 3 5
3

3
4
3
3

3
3
4
3

65
3
5 3
9
3 :
:9 3 5
3 87 3 3
4
3 3

3
3
5
3

65
3
4 3
9
3 :
:9 3 4
3 87 3 3
5
3 3

3
3
4
3

299

6
3
3 :
:
3 8
4

The preceding matrix is already in Jordan form. It has minimum polynomial [ 


7
5 and characteristic polynomial +[  5, , the same characteristic polynomial as the
previous one, but a different minimum polynomial and a different Jordan form.
L Matrices + Jordan Form

  4 4
4
5
 l
@ 5 4 5
l
4 4
5

4
5

. 45 l
 45 l



l 3
3 l



4 4l
4 4.l

 In this case,
 Mq4 +4 , @ ^l` and Mq5 +5 , @ ^l` are 4  4 matrices. The matrix
4
5
has characteristic and minimum polynomial {5 . 4 @ +{ . l, +{  l, =
4 4

Orthogonal Matrices
An ruwkrjrqdo pdwul{ is a real matrix for which the inner product of any two different
columns is zero and the inner product of any column with itself is one. The matrix is
said to have ruwkrqrupdo columns. Such a matrix necessarily has orthonormal rows as
well.
L Matrices + Orthogonality Test


frv   vlq 
vlq 
frv 


, orthogonal? wuxh

4
3 3 4
C 4 3 3 D, orthogonal? wuxh
3 4 3


3 4
4 4


, orthogonal? i dovh

Singular Value Decomposition (SVD)


Any p  q real matrix D can be factored into a product D @ XGY , with X and Y
real orthogonal p  p and q  q matrices, respectively, and G a diagonal matrix with

300

Chapter 8 Matrices and Matrix Algebra


positive numbers in the rst rank-D entries on the main diagonal and zeroes everywhere
else. The entries on the main diagonal of G are called the singular values of D. This
factorization D @ XGY is called a singular value decomposition of D.
L Matrices + Singular Values
5

6
8 8 6
7 6
3
8 8, singular values: i6=89> 7=94> 43=4j
4=3
8
7


8 8 6
6 3
8


s s
47> :< @ i6=:7> ;=;<j
, singular values:

L Matrices + SVD
5

6
8 8 6
7 6
3
8 8@
4
8
7
5
65
65
6
=:55 =4<4 =998
43=4
3
3
=776
=94;
=97<
7 =788
=8<6 =997 8 7 3
7=94
3 8 7 =:96 =973 =3;<: 8
=855 =:;5 =674
3
3
6=89
=7:4
=789 =:88
These two outer matrices fail the orthogonality test because they are numerical approximations only. You can check the inner products of the columns to see that they are
approximately orthogonal.
L Matrices + Singular Values, Matrices + SVD



4 5=3
, singular values: i=699> 8=7:j
6 7

 



4 5
=738 =<48
8=7:
3
=8:9 =;4:
@
6 7
=<48
=738
3
=699
=;4: =8:9

PLU Decomposition
Any p  q real matrix D can be factored into a product D @ S OX , with O and X real
lower and upper triangular p  p and p  q matrices, respectively, with 4s on the
main diagonal of O, and with S a permutation matrix. This factorization D @ S OX is
called the SOX ghfrpsrvlwlrq of D. The matrix X is an echelon form of D.

Exercises

301

L Matrices + PLU Decomposition


5

6 5
65
65
6
4 5 6
4 3 3
4 3 3
4 5
6
7 5 7 9 8 @ 7 3 3 4 8 7 6 4 3 8 7 3 7 ; 8
6 5 4
3 4 3
5 3 4
3 3
3
5

6 5
65
4
5 8 6 8
4 3 3
:
7 : 8
<
9 8 @ 7 3 4 3 87 5
7 6
8 <
3 3 4
5
6 5
65
4
78
;
4 3 3
7 <6 <5 8 @ 7 3 4 3 8 7  64
48
76
76 95
3 3 4
78

3
4
59
78




=865 4=<8
4=8 =3346
3 3
3 3


@


@

4 3
3 4

3 4=3
4=3 3




4 3
3 4

3
4


4556
49<;

4=3
3
= 687 9: 4=3



3 3
3 3

65
3
5 8 6
6<
3 8 7 3 78
5
5
7
4
3 3  48
65
3
78
3 87 3
4
3


;

4465
48

8

7:
5
899
78

6
8

6
8

4= 8 =33 46
3 4= <7< 8

Note that the upper triangular matrix in the rst example is the same as the following.
L Matrices + Fraction-Free Gaussian Elimination
5
6
5
6
4 5 6
4 5
6
7 5 7 9 8, fraction-free Gaussian elimination: 7 3 7 ; 8
6 5 4
3 3
3
In general, the upper triangular matrix in the PLU decomposition is the echelon form
of the original matrix obtained by Gaussian elimination.

Exercises




1. The vectors x @ 4 4 3 and y @ 4 4 4 span a plane in U6 = Find the
projection matrix S onto the plane, and nd a nonzero vector e that is projected to
zero.
2. For the following matrix, nd the characteristic polynomial, minimum polynomial,
eigenvalues, and eigenvectors. Discuss the relationships among these, and explain
the multiplicity of the eigenvalue.
5
6
5 3 3 3
9 4 5 3 3 :
9
:
7 3 3 5 3 8
3 3 6 5

302

Chapter 8 Matrices and Matrix Algebra




4 4 4
4 3 5


?

3. Which of the following statements are correct for the matrix D @


5
6
 
{4
3
The set of all solutions { @ 7 {5 8 of the equation D{ @
is the column
3
{6
space of D the row space of D a nullspace of D a plane a line a point.


frv   vlq 
4. The matrices that rotate the {|-plane are D +, @
. Verify
vlq 
frv 
4
that D +, D +*, @ D + . *, and D +, @ D +, , using matrix products and
trigonometric identities.

Solutions
1. The projection matrix S onto the plane in U6 spanned by the vectors x @ ^4> 4> 3`
4 W

D , where x and y are the columns
and y @ ^4> 4> 4` is the product S @ D DW D
of D.
5 4 4
644 5
6W
5
6 35
6
6W 5
3
4 4
4 4
4 4
4 4
5
5
F
E
 S @ 7 4 4 8 C7 4 4 8 7 4 4 8D 7 4 4 8 @ 7 45 45 3 8
3 4
3 4
3 4
3 4
3 3 4
Note that S z is a linear combination of x and y for any vector z @ +{> |> }, in U6 ,
so S maps U6 onto the plane spanned by x and y.
5 6
5 6
5 4 4
65
6 5 4
6
 4

3
4
{
{ . 45 |
5
5
5
{.|
} 7 4 8.}7 4 8
 7 45 45 3 8 7 | 8 @ 7 45 { . 45 | 8 @
5
3
4
}
}
3 3 4
To nd a nonzero vector e that is projected to zero, leave the insertion point in the
matrix S , and from the Matrices submenu choose Nullspace Basis.
;5
5 4 4
6
6<
3
? 4 @
5
5
 7 45 45 3 8, nullspace basis: 7 4 8
=
>
3
3 3 4
5

6
5 3
3 3
9 4 5
3 3 :
: has characteristic polynomial +[  5,7 , minimum
2. The matrix 9
7 3 3
5 3 8
3 3 6 5
5
polynomial 7  7[ . [ 5 @ +[  5, , and eigenvalue and eigenvectors
;
5 6 5 6<
3
3 A
A
A
A
?
9 3 : 9 4 :@
:>9 :
5> 7> 9
7 3 8 7 3 8A
A
A
A
=
>
4
3

Solutions

303

The minimal polynomial is a factor of the characteristic polynomial. The eigenvalue


5 occurs with multiplicity 7 as a root of the characteristic polynomial +[  5,7 . The
eigenvalue 5 has two linearly independent eigenvectors. Note that
5
65 6 5 6
5 6
5 3 3 3
3
3
3
9 4 5 3 3 :9 3 : 9 3 :
9 3 :
:9 : 9 :
9 :
 9
7 3 3 5 3 87 3 8 @ 7 3 8 @ 57 3 8
3 3 6 5
4
5
4
5


5
9 4
9
7 3
3

3 3
5 3
3 5
3 6

65
3
3
9 4
3 :
:9
3 87 3
5
3

6
5
3
3
: 9 5 :
9 4
: @ 9 : @ 59
8 7 3 8
7 3
3
3

6
:
:
8

3. The solutions of this equation are in U6 , and the column space of D is a subset of
U5 , so these solutions cannot be the column space of D. They do form the nullspace
of D by the denition of nullspace consequently, this
is a subspace of U6 . The
5 set 6

 4
 
4 4 4 7 8
6
4 @
product of D with the rst row of D is
, which is not
4 3 5
6
4
 
3
, so the solution set is not the row space of D.
3
To determine whether this subspace of U6 is a point, line, or plane, solve the system
of equations: from the Solve submenu, choose Exact
6
5
6
5
 

 {4
5w4
3
4 4 4 7
{5 8 @
w4 8
, Solution is: 7
3
4 3 5
{6
w4
The
 subspace is a line. It is the line that passes through the origin and the point
5 4 4 .
4. Apply the following operations in turn.


frv   vlq 
 New Denition: D +, @
vlq 
frv 
 Evaluate, Evaluate: 


frv   vlq 
frv *  vlq *
D +, D +*, @
vlq 
frv 
vlq *
frv *


frv  frv *  vlq  vlq *  frv  vlq *  vlq  frv *
@
vlq  frv * . frv  vlq *
frv  frv *  vlq  vlq *


Leave the insertion point in the matrix, and from the Combine submenu choose

304

Chapter 8 Matrices and Matrix Algebra


Trig Functions.


frv  frv *  vlq  vlq *  frv  vlq *  vlq  frv *
@
vlq  frv * . frv  vlq *
frv  frv *  vlq  vlq *


frv + . *,  vlq + . *,
vlq + . *,
frv + . *,

This result proves the rst identity. For the second part, carry out the following steps.


Evaluate

D +, D +, @


Evaluate

frv 
vlq 

 vlq 
frv 


frv 
vlq 


 vlq 
frv 
frv 
 vlq 



frv 
 vlq 

vlq 
frv 

vlq 
frv 


@


frv5  . vlq5 
3
3
frv5  . vlq5 
Leave the insertion point in the matrix and choose Simplify, or from the Combine submenu choose Trig Functions.
 


4 3
3
frv5  . vlq5 
@
3 4
3
frv5  . vlq5 

Das könnte Ihnen auch gefallen