8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are...

46
8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi- neering, 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 coef¿cients. 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 identi¿ed 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. Example 66 De¿ne D @ 5 7 ;8 88 6: 68 <: 83 :< 89 7< 6 8 using De¿ne + New De¿nition. Then applying Evaluate yields the following. D @ 83 D @ 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.

Transcript of 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are...

Page 1: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

8 Matrices and Matrix Algebra

Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics, and statistics. The algebra of matrices provides a model for thestudy of vector spaces and linear transformations.

Introduction

A rectangular array of mathematical expressions is called apdwul{. A matrix with prows andq columns is referred to as anp� q matrix. Matrices are sometimes referredto simply asduud|v/ and anp� 4 or 4� q array is also called ayhfwru.

Entries in matrices can be real or complex numbers, or mathematical expressionswith real or complex coef¿cients. Most of the choices from theMatrices submenu willoperate on both real and complex matrices. TheQR andSVD factorizations discussedlater in this chapter assume real matrices.

Matrix entries are identi¿ed by their row and column number. The matrix can beconsidered 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.

Example 66 De¿neD @

57 �;8 �88 �6:

�68 <: 83:< 89 7<

68 usingDe¿ne + New De¿nition.

Then applyingEvaluate 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 theView menu that affect the appearance of matrices on thescreen. Helper Lines and Input Boxes can beshown or hidden. The default is toshow them to make it easier to handle entries on the screen. However, matrix helperlines and input boxes may not appear when you preview or print the document. Forthis reason, you will generally want to put brackets around matrices. The result of anoperation 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 ofthe matrix. Vertical straight brackets are interpreted as a mathematical operation (calleda determinant) so they should be avoided for general use.

Page 2: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

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 num-bers are legitimate entries, as well as algebraic expressions.

You can move about in a matrix with the arrow keys, by pressingTAB andBACKTAB,and by using the mouse. PressingSPACEBAR will move your insertion point through themathematics or out of the matrix.

A 5� 5 matrix can be entered from a Windows keyboard withCTRL + A. You canalso create anp� q matrix usingFill Matrix from theMatrices submenu.

L To create a matrix with Fill Matrix

1. From theMatrices submenu, chooseFill Matrix.

2. Set the row and column numbers.

Page 3: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

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. Thesechoices are discussed in the next few paragraphs.

ZeroYou can get an p� q matrix of all zeroes, for any p and q.

L Matrices + Fill Matrix + Zero

�3 33 3

IdentityYou can get an q�q identity matrix for any q. You can also specify a nonsquare matrixand choose identity.

L Matrices + Fill Matrix + Identity

57 4 3 3

3 4 33 3 4

68

57 4 3 3 3

3 4 3 33 3 4 3

68

5997

4 3 33 4 33 3 43 3 3

6::8

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

RandomWith this option, you get a matrix ¿lled with random integers between �<< and <<.

L Matrices + Fill Matrix + Random

� �;8 8869 �68

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

Page 4: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

262 Chapter 8 Matrices and Matrix Algebra

This lets you specify the range for random (integer) entries as well as specify somespecial types.

L Matrices + Random Matrix

(6�6, Unrestricted (respectively Symmetric, Antisymmetric, Triangular), Rangeof Random Entries: -10 to 10)57 �7 : ;

43 �9 �;�8 : 9

68

57 �9 3 �43

3 8 4�43 4 4

68

57 3 �7 :

7 3 ;�: �; 3

68

57 �7 �6 �43

3 �; 83 3 �4

68

Jordan BlockA 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 numberof rows and columns and for an item for the diagonal. Jordan forms that are built fromJordan blocks are discussed in more detail later in this chapter.

L Matrices + Fill Matrix + Jordan block

5� 5 with � on diagonal and7� 7 with { on diagonal

�� 43 �

� 3EEC

{ 4 3 33 { 4 33 3 { 43 3 3 {

4FFD

De¿ned by FunctionTo use theDe¿ned by Function option,¿rst de¿ne a functioni+l> m, of two variables.

Page 5: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Introduction 263

Then use De¿ned by Function to create the p � q matrix with +l> m, entry equal toi+l> m, for 4 � l � p and 4 � m � q.

Example 67 Kloehuw pdwulfhvDe¿ne i+l> m, @ 4

l.m�4 .From the Fill Matrix dialog, choose De¿ned by Function.Type i in the box for the function name.Set rows and columns to 5 or 6=Click OK. %

4 45

45

46

& 597

4 45

46

45

46

47

46

47

48

6:8

Example 68 Ydqghuprqgh pdwul{De¿ne the function j+l> m, @ {m�4l .From the Fill Matrix dialog, choose De¿ned by function.Enter j for the function name.Set rows and columns to 7. 5

99974 {4 {54 {644 {5 {55 {654 {6 {56 {664 {7 {57 {67

6:::8

You can use Fill Matrix to create a general matrix with entries such as dl>m .

Example 69 Dq _duelwudu|% 6� 6 pdwul{De¿ne the function d+l> m, @ dl>m .From the Fill Matrix dialog, choose De¿ned by function.Enter d for the function name.Set rows and columns to 6. 5

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

68

Note the comma between subscripts. Without the comma in the de¿nition of thefunction d +l> m,, the subscript lm would be interpreted as a product! You can use thefollowing trick to create a general matrix up to <� < with no commas in the subscripts.

Example 70 Dqrwkhu irup iru dq _duelwudu|% 6� 6 pdwul{De¿ne the function d+l> m, @ d43l.m .From the Fill Matrix dialog, choose De¿ned by function.Enter d for the function name.Set rows and columns to 6. 5

7 d44 d45 d46d54 d55 d56d64 d65 d66

68

Page 6: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

264 Chapter 8 Matrices and Matrix Algebra

Example 71 Frqvwdqw pdwulfhv

From the Fill Matrix dialog, choose De¿ned by function.Enter 8 for the function name. �

8 88 8

BandThe Band option requires that you enter a list such as “d> e> f” with an odd number ofentries. 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 itemin the middle of your list.

Example 72 D 5� 5 edqg pdwul{

From theFill Matrix dialog, chooseBand.Typed in theEnter band list box.�

d 33 d

Example 73 Edqg pdwulfhv

From theFill Matrix dialog, chooseBand.Typed> e> f in theEnter Band List box.Set rows to5 or 8, and columns to5, 8, or ;.

�e fd e

�599997

e f 3 3 3d e f 3 33 d e f 33 3 d e f3 3 3 d e

6::::8

599997

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

6::::8

Example 74 ChoosingBand and entering the lists “3,” “ 4,” and “3> �> 4” generates azero matrix, an identity matrix, and a Jordan block, respectively.5

7 3 3 33 3 33 3 3

68

57 4 3 3

3 4 33 3 4

68

57 � 4 3

3 � 43 3 �

68

Revising Matrices

Rows, columns, or a block of rows or columns can be deleted from a matrix. Thealignment of rows and columns can be reset. A rectangular block can be replaced.

Page 7: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

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 blockof 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 notoutside of any brackets) or by placing the insertion point in an empty cell of thematrix.

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 onlywhen a matrix is selected. If they do not appear, reposition the insertion point or selectthe matrix with click and drag, being careful to select only the inside of the matrix—thatis, not including the exteriorHelper Lines.

Tip In the special case of a vector represented as anq � 4 or 4 � q matrix, you canlengthen the vector by placing the insertion point in the last input box and pressingENTER. You can shorten a vector by placing the insertion point in the last input box andpressingBACKSPACE. You can start with a display box, or the input boxes that appearwith 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 ofthe matrix, pressSHIFT + RIGHT ARROW).

2. Click theProperties button .

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

Page 8: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

266 Chapter 8 Matrices and Matrix Algebra

Replacing a Rectangular BlockYou 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 matrix57 4 5 6

8 8 7: ; <

68

to the zero matrix,Select the lower-right5�5 corner of the matrix using the mouse. From theMatrices

submenu, chooseFill Matrix. ChooseZero.57 4 5 6

8 3 3: 3 3

68

The lower-right corner isreplaced by the5�5 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 pressingDEL.

Example 76 To delete the entries in the lower-right5� 5 corner of the matrix57 4 5 6

8 8 7: ; <

68

Select the lower-right5� 5 corner of the matrix using the mouse.PressDEL to get 5

7 4 5 68 � �: � �

68

Concatenating Matrices

You can merge two matrices into one if they have the same number of rows.

L To concatenate two matrices

Page 9: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

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 56 7

��8 9: ;

�, concatenate:

�4 5 8 96 7 : ;

��

{. 4 56| 7w. 5

��8 . zs

:}

�, concatenate:

�{. 4 5 8 . z6| 7w. 5

s:}

Reshaping Lists and Matrices

A list of expressions entered in mathematics and separated by commas can be turnedinto a matrix where the entries of the matrix, reading left to right and top to bottom, arethe 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 endare left blank.

L Reshape

78> 54> ;> 4<> 3> 8> 48> 9 to 3 columns:

57 78 54 ;

4< 3 848 9 �

68

A matrix ¿lled with data can be reshaped, with the new matrix corresponding to thesame 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.

Page 10: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

268 Chapter 8 Matrices and Matrix Algebra

3. Specify the new number of columns.

L Reshape

� �;8 �88 �6: �68<: 83 :< 89

�to 3 columns:

57 �;8 �88 �6:

�68 <: 83:< 89 �

68

See page 353 for further examples.

Standard Operations

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

Matrix Addition and Scalar Multiplication

You add two matrices of the same dimension by adding corresponding entries. Thenumbers or other expressions used as matrix entries are called vfdoduv. You multiplya scalar with a matrix by multiplying every entry of the matrix by the scalar. You cando matrix addition and multiplication and other operations with scalars and matrices bychoosing Evaluate. Place the insertion point anywhere inside the expression.

L Evaluate�4 57 6

�.

�8 9; :

�@

�9 ;45 43

Note that the sum appears with the same brackets as the original matrices.

L Evaluate�d44 d45d54 d55

�.

�e44 e45e54 e55

�@

�d44 . e44 d45 . e45d54 . e54 d55 . e55

d

�4 57 6

�@

�d 5d7d 6d

d

�4 57 6

�� e

�8 9; :

�@

�d� 8e 5d� 9e7d� ;e 6d� :e

Inner Products and Matrix Multiplication

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

Page 11: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Standard Operations 269

a scalar called the lqqhu surgxfw (sometimes called the grw surgxfw) of the two vectors.The pdwul{ surgxfw of an p�n matrix with a n�q matrix is an p�q matrix obtainedby taking inner products of rows and columns, the lmth entry of the product DE beingthe inner product of the lth row of D with the mth column of E.

L Evaluate

�d e

�� fg

�@ df. eg

�d ex y

��fg

�@

�df. egxf. yg

��

4 57 6

��8 9; :

�@

�54 5377 78

�8 9; :

�6@

�<74 <754589 4588

To put an exponent on a matrix, place the insertion point immediately on the right

of the matrix, click or choose Insert + Superscript, and type the exponent in theinput box.

Identity and Inverse Matrices

The q � q lghqwlw| matrix L has ones down the main diagonal (upper-left corner tolower-right corner) and zeroes elsewhere. The6� 6 identity matrix, for example, is

L @

57 4 3 3

3 4 33 3 4

68

The lqyhuvh of anq � q matrix D is anq � q matrix E satisfyingDE @ L. To¿nd the inverse of an invertible matrixD, enterD with “�4” as a superscript and applyEvaluate. (As an alternative, leave the insertion point anywhere inside the matrixD,and from theMatrices submenu, chooseInverse.)

L Evaluate

�8 9; :

��4@

3EC � :

46

9

46;

46� 8

46

4FD

To check that this matrix satis¿es the de¿ning property, evaluate the product.

Page 12: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

270 Chapter 8 Matrices and Matrix Algebra

�8 9; :

� 3EC � :

46

9

46;

46� 8

46

4FD @

�4 33 4

The operation Evaluate Numerically gives you a numerical approximation of theinverse. The accuracy of this numerical approximation depends on properties of thematrix, 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 ofaccuracy of the approximation.

L Evaluate�8 9; :

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

�@

�=<<<<; �=33335

�=33335 =<<<<;

Since +Dq,�4 @�D�4

�q, you can compute negative powers of invertible matrices.

L Evaluate

�8 9; :

�6

@

�<74 <754589 4588

�8 9; :

��6@

# �458854<:

<7554<:

458954<: � <74

54<:

$

�<74 <754589 4588

�# �458854<:

<7554<:

458954<: � <74

54<:

$@

�4 33 4

The preceding product demonstrates that D�6 @�D6

��4.

The p� q matrix with every entry equal to zero is the lghqwlw| iru dgglwlrq� thatis, for any p� q matrix D,

D. 3 @ 3 .D @ Dand the dgglwlyh lqyhuvh of a matrix D is the matrix +�4,D.

L Evaluate57 d4>4 d4>5

d5>4 d5>5d6>4 d6>5

68.

57 �d4>4 �d4>5

�d5>4 �d5>5�d6>4 �d6>5

68 @

57 3 3

3 33 3

68

Page 13: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Standard Operations 271

Polynomials with Matrix Values

You can apply a polynomial function of one variable to a matrix, as in the followingexample.

Example 77 A polynomial expression, such as {5 � 8{ � 5, can be evaluated at amatrix.

� Leave the insertion point in the expression { @

�4 57 6

�, and from the De¿ne

submenu, choose New De¿nition.

� 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 de¿ne the function i+{, @ {5� 8{� 5 and apply Evaluate (twice) toget the following.

L Evaluate, Evaluate

i

��4 57 6

��@

�4 57 6

�5� 8

�4 57 6

�� 5 @

�5 �5�7 3

The expression �8

�4 57 6

��5 is not, strictly speaking, a proper expression. How-

ever, when evaluated, the5 is interpreted in this context as�

5 33 5

�, or twice the5� 5

identity matrix.

Another say to evaluate a polynomial at a matrix is to de¿ne the matrixD @

�4 57 6

�,

enclose the polynomial in square brackets, and evaluate at{ @ D, as in the followingexample.

L Evaluate, Evaluate

�{5 � 8{� 5

�{@D

@

�4 57 6

�5� 8

�4 57 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 whileholding down theCTRL key. That will perform the operation in place, leaving the rest

Page 14: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

272 Chapter 8 Matrices and Matrix Algebra

of the matrix unchanged. Because you are in a word-processing environment, you canedit individual entries (just click in the input box and then edit) and apply other word-processing features to entries, such as copy and paste or click and drag.

Many of the operations on theMaple menu operate directly on the entries whenapplied to a matrix, as can be seen from the following examples.

L Factor�8 9; :

�@

�8 5� 656 :

L Evaluate

�gg{

vlq{U9{5g{

g5

g{5oq{ {. 6{

�@

�frv{ 5{6

� 4{5

7{

L Evaluate Numerically

�vlq5 � hoq 8 {. 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

gg{

�{. 4 5{6 � 6vlq 7{ 6 vhf{

�@

�4 9{5

7 frv 7{ 6 vhf{ wdq{

Row Operations and Echelon Forms

One of the elementary applications of matrix arrays is storing and manipulating coef¿-cients of systems of linear equations. The various steps that you carry out in applyingthe 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

Page 15: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Row Operations and Echelon Forms 273

can be applied equally well to the matrix of coef¿cients and scalars59997

d44 d45 = = = d4q e4d54 d55 = = = d5q e5

...... = = =

......

dp4 dp5 = = = dpq ep

6:::8

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 asa urz hfkhorq irup/ where the number of leading zeroes increases as the row numberincreases. The system provides several choices for obtaining a row echelon form , oneof 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 zeroesabove and below that entry.

Gaussian Elimination and Row Echelon Form

The three row echelon forms that can be obtained directly are illustrated in the followingexamples.

L Matrices + Fraction-free Gaussian Elimination�d ef g

�, fraction-free Gaussian elimination:

�d e3 gd� ef

��

; 5 65 �8 ;

�, fraction-free Gaussian elimination:

�; 5 63 �77 8;

L Matrices + Reduced Row Echelon Form�d ef g

�, Reduced row echelon form:

�4 33 4

�; 5 65 �8 ;

�, Reduced row echelon form:

%4 3 64

77

3 4 �5<55

&

Elementary Row Operations

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

Page 16: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

274 Chapter 8 Matrices and Matrix Algebra

elementary row operation as you want to perform on your matrix. The technique isillustrated in the following examples.

To create an elementary matrix, choose Fill Matrix from the Matrices submenu� getan identity matrix of the appropriate dimension by making choices in the Fill Matrixdialog 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 457 4 3 �

3 4 33 3 4

6857 �8 �5 �4

6 �9 54 7 4

68 @

57 �8 . � �5 . 7� �4 . �

6 �9 54 7 4

68

L Interchange rows 5 and 6

57 4 3 3

3 3 43 4 3

6857 �83 �45 �4;

64 �59 �954 �7: �<4

68 @

57 �83 �45 �4;

4 �7: �<464 �59 �95

68

L Multiply row 5 by �

57 4 3 3

3 � 33 3 4

6857 ;3 �5 �4;

66 �59 ;547 �7: �<4

68 @

57 ;3 �5 �4;

66� �59� ;5�47 �7: �<4

68

Equations

Systems of equations were introduced on page 71. The algebra of matrices provides youwith 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, withone equation to a row. When you have the same number of unknowns as equations, putthe insertion point anywhere in the system, and from the Solve submenu, choose Exact.The variables are found automatically without having to be speci¿ed, as in the followingexample.

L Solve + Exact

{. | � 5} @ 45{� 7| . } @ 35| � 6} @ �4

, Solution is :�{ @ 4:

; > | @ 44; > } @ 8

7

Page 17: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Equations 275

To solve a system of equations with two equations and three unknowns, you mustspecify Variables to Solve for in a dialog box. Put the insertion point anywhere in thematrix and from the Solve submenu, choose Exact. A dialog box comes up asking youto specify the variables. Enter the variable names, separated by commas.

L Solve + Exact

Variable(s) to Solve for : {> |

5{� | @ 4{. 6} @ 7

, Solution is : i| @ �9} . :> { @ �6} . 7j

Variable(s) to Solve for : {> }

5{� | @ 4{. 6} @ 7

, Solution is :�{ @ 4

5 . 45|> } @ :

9 � 49|

�=

Matrix Equations

The system of equationsd44{4 . d45{5 . = = =. d4q{q @ e4

d54{4 . d55{5 . = = =. d5q{q @ e5...

dp4{4 . dp5{5 . = = =. dpq{q @ epis the same as the following matrix equation:5

9997d44 d45 = = = d4qd54 d55 = = = d5q

...... = = =

...dp4 dp5 = = = dpq

6:::859997

{4{5...{q

6:::8 @

59997

e4e5...ep

6:::8

You can solve these systems using Exact on the Solve submenu. There are advantagesto solving systems of equations in this way, and often you can best deal with systemsof linear equations by solving the matrix version of the system. Two of the precedingexamples correspond to the ¿rst two of the following matrix equations. Compare theseresults with the solutions obtained previously.

Example 78 Multiply the coef¿cient matrix

57 4 4 �5

5 �7 43 5 �6

68 by the vector

57 {

|}

68

to display the system of equations{. | � 5} @ 45{� 7| . } @ 35| � 6} @ �4

in matrix form.

57 4 4 �5

5 �7 43 5 �6

6857 {

|}

68 @

57 {. | � 5}

5{� 7| . }5| � 6}

68 @

57 4

3�4

68

Page 18: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

276 Chapter 8 Matrices and Matrix Algebra

L Solve + Exact

57 4 4 �5

5 �7 43 5 �6

6857 {

|}

68 @

57 4

3�4

68, Solution is :

597

4:;44;87

6:8

�5 �4 34 3 6

�57 {|}

68 @

�47

�, Solution is :

57 7� 6w4

:� 9w4w4

68

�5 �4 3 44 3 6 4

�5997{|}z

6::8 @

�47

�, Solution is :

5997

7� 6w4 � w5:� 9w4 � w5

w4w5

6::8

In the ¿rst case, you can also solve the equation by multiplying both the left and rightsides of the equation by the inverse of the coef¿cient matrix, and evaluating the product.

L Evaluate

57 {

|}

68 @

57 4 4 �5

5 �7 43 5 �6

68�4 5

7 43

�4

68 @

597

4:;44;87

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 appliesto 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.

Page 19: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Matrix Operators 277

L Trace

�d ef g

�, trace: d. g

3C �;8 �88 �6:

�68 <: 83:< 89 7<

4D, trace: 94

Transpose

The wudqvsrvh of an p � q matrix is the q � p matrix that you obtain from the ¿rstmatrix 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 ef g

�, transpose:

�d fe g

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

L Evaluate

�d e fg h i

�W@

3C d g

e hf i

4D

Hermitian Transpose

The Khuplwldq wudqvsrvh of a matrix is the transpose together with the replacement ofeach entry by its complex conjugate. It is also referred to as the dgmrlqw or Khuplwldqdgmrlqw of a matrix (not to be confused with the classical adjoint or adjugate, discussedelsewhere 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.

Page 20: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

278 Chapter 8 Matrices and Matrix Algebra�d. le f. lgh. li j . lk

�, Hermitian transpose:

�d� le h� lif� lg j � lk

��

5 . l �l7� l 5 . l

�, Hermitian transpose:

�5� l 7 . ll 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 �7l5� l 6 . 5l

Determinant

The ghwhuplqdqw of an q�q matrix +dlm, is the sum and difference of certain productsof the entries. Speci¿cally,

ghw+dlm, @[�

+�4,vjq+�, d4�+4,d5�+5, � � � dq�+q,

where � ranges over all the permutations of i4> 5> = = = > qj and +�4,vjq+�, @ 4, de-pending 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 theMatrices submenu, chooseDeterminant.

L Matrices + Determinant

�d ef g

�, determinant:dg� ef

57 d4>4 d4>5 d4>6

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

68, determinant:

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

57 �;8 �88 �6:

�68 <: 83:< 89 7<

68, determinant:�45485<

Page 21: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Matrix Operators 279

You can denote the determinant by

ghw

57 �;8 �88 �6:

�68 <: 83:< 89 7<

68

where det is typed while in mathematics mode. This string is a multicharacter functionname. 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 ef g

�@ dg� ef

���� d ef g

���� @ dg� ef

ghw

57 d4>4 d4>5 d4>6

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

68 @ d4>4d5>5d6>6�d4>4d5>6d6>5�d5>4d4>5d6>6.d5>4d4>6d6>5.

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

57 �;8 �88 �6:

�68 <: 83:< 89 7<

68, determinant: �45485<

���� �;8 �88�68 <:

���� @ �43 4:3

Adjugate

The adjugate or classical adjoint of a matrix D is the transpose of the matrix of cofactorsof D. The l> m cofactor Dlm of D is the scalar +�4,l.m ghwD +lmm,, where D +lmm, denotesthe matrix that you obtain from D by removing the lth row and mth column.

L Matrices + Adjugate

�d ef g

�, adjugate:

�g �e

�f d

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

d ef g

��g �e

�f d

�@

�dg� ef 3

3 dg� ef

Page 22: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

280 Chapter 8 Matrices and Matrix Algebra

L Matrices + Adjugate

5997

< 9 : �87 �; �6 <5

�6 �9 : 98 �8 3 �4

6::8, adjugate:

5997

66;7 79< �64;6 :463665< 634 �6533 �;486739; �594 9;<9 �5<:95:8 ;73 ;8 �4449

6::8

L Evaluate5997

< 9 : �87 �; �6 <5

�6 �9 : 98 �8 3 �4

6::85997

66;7 79< �64;6 :463665< 634 �6533 �;486739; �594 9;<9 �5<:95:8 ;73 ;8 �4449

6::8

@

5997

::864 3 3 33 ::864 3 33 3 ::864 33 3 3 ::864

6::8

ghw

5997

< 9 : �87 �; �6 <5

�6 �9 : 98 �8 3 �4

6::8 @ ::864

Note The relationship just demonstrated gives a formula for the inverse of an invert-ible matrixD.

D�4 @4

ghwDdgmxjdwhD

Permanent

Theshupdqhqw of anq � q matrix +dlm, is the sum of certain products of the entries.Speci¿cally,

permanent+dlm, @[�

d4�+4,d5�+5, � � � dq�+q,where� ranges over all the permutations ofi4> 5> = = = > qj. This operation applies tosquare matrices only.

L To compute the permanent of a matrix

1. Place the insertion point in the matrix.

Page 23: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Matrix Operators 281

2. From the Matrices submenu, choose Permanent.

L Matrices + Permanent

�d ef g

�, permanent: dg. ef

57 d4>4 d4>5 d4>6

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

68, permanent:

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

Maximum and Minimum Matrix Entries

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

L Evaluate

pd{

57 �;8 �88 �6: �68 <:

83 :< 89 7< 968: �8< 78 �; �<6

68 @ <:

plq

5997

<5 76 �95 :: 9987 �8 << �94 �83�45 �4; 64 �59 �954 �7: �<4 �7: �94

6::8 @ �<4

Matrix Norms

Choosing Norm from the Matrices submenu gives the 5-norm of a vector or matrix.The 20qrup, orHxfolghdq qrup, of a vector is the Euclidean length of the vector.

���� de

���� @sd5 . e5

��������defg

��������@

sd5 . e5 . f5 . g5

The50qrup, orHxfolghdq qrup, of a matrixD is its largest singular value—the numberde¿ned by

nDn @ pd{{ 9@3

nD{nn{n

Page 24: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

282 Chapter 8 Matrices and Matrix Algebra

L Matrices + Norm

�5 68 :

�, 2-norm: 45

s;< . 4

5

s;8

3C 5 �4 3

�4 5 �43 �4 5

4D, 2-norm:5 .

s5

�5 . 6l 8

9 �: . 5l

�, 2-norm: 45

s587 . 5

s7<: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 pressingSHIFT + RIGHT ARROW.

2. Click or chooseInsert + Brackets. Select the norm symbols. ChooseOk.

L Evaluate

���� =5 =6=8 =:

���� @ = <65 9;

���� 8 :�46 9

���� @ 45

s854 . 4

5

s6:

���� 5 . 6l 89 �: . 5l

���� @ 45

s587 . 5

s7<:6

The40qrup of a matrix is the maximum among the sums of the absolute values ofthe terms in a column:

nDn4 @ pd{4�m�q

#q[l@4

mdlm m$

Page 25: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Matrix Operators 283

L Evaluate���� d ef g

����4

@ pd{ +mdm. mfm > mem. mgm,���� =5567 =648;

�=8957 =:444

����4

@ 4= 359 <

���� 8 :�46 9

����4

@ 4;

���� 8 . 6l :�46 9� 8l

����4

@s67 . 46

The 4-qrup of a matrix is the maximum among the sums of the absolute values ofthe terms in a row:

nDn4 @ pd{4�l�q

3C q[m@4

mdlm m4D

L Evaluate���� d ef g

����4

@ pd{ +mdm. mem > mfm. mgm,���� =5567 =648;

�=8957 =:444

����4

@ 4= 5:6 8

���� 8 :�46 9

����4

@ 4<

���� 8 . 6l :�46 9� 8l

����4

@ 46 .s94

The Kloehuw0Vfkplgw qrup (or Iurehqlxv qrup) nDnI of a matrix D is the squareroot of the sums of the squares of the terms of the matrix D.

nDnI @

3EC [

4�m�q4�l�q

mdlm m54FD

4

5

L Evaluate���� 8 . 6l :�46 9� 8l

����I

@s646

���� d ef g

����I

@

u�mdm5 . mem5 . mfm5 . mgm5

����� 8 :

�46 9

����I

@ 6s64

���� =5567 =648;�=8957 =:444

����I

@ = <;8 9<

Condition Number

The frqglwlrq qxpehu of an invertible matrix D is the product of the 5-norm ofD andthe5-norm ofD�4. This number measures the sensitivity of some solutions of linear

Page 26: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

284 Chapter 8 Matrices and Matrix Algebra

equations D{ @ e to perturbations in the entries of D and e. The matrix with conditionnumber 4 is “perfectly conditioned.”

L Matrices + Condition Number

57 3 4 3

3 3 44 3 3

68, condition number:4

57 8 �8 �6

�6 3 84 8 7

68, condition number:5=;57<

5997

5 �4 3 3�4 5 �4 33 �4 5 �43 3 �4 5

6::8, condition number:

�85 .

45

s8� �

65 .

45

s8�

@ <=7:547

59997

4 45

46

47

45

46

47

48

46

47

48

49

47

48

49

4:

6:::8, condition number:48847

�4 44 4=33334

�, condition number:733335

These¿nal two matrices are extremely ill-conditioned. Small changes in some en-tries ofD or e may result in large changes in the solution to linear equations of the formD{ @ e in these two cases.

Exponential Functions

The most natural way to de¿nehP is to imitate the power series forh{ =

� h{ @ 4 . {. 45{

5 . 49{

6 . 457{

7 . � � �� hP @ 4 .P . 4

5P5 . 4

9P6 . 4

57P7 . � � �

In general,

hwP @4[n@3

+wP,n

n$

To evaluate the expressionhP for a matrixP , leave the insertion point in the expression

Page 27: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Polynomials and Vectors Associated With a Matrix 285

hP and choose Evaluate, as shown in the following examples. First de¿ne

D @

�4 53 6

�, E @

�4 53 4

�, F @

57 3 4 3

3 3 43 3 3

68 , G @

57 4 6 3

3 4 33 3 4

68

L Evaluate

hD @

%56h�4 . 4

6h8 4

6h8 � 4

6h�4

56h

8 � 56h�4 4

6h�4 . 5

6h8

&hwD @

%56h�w . 4

6h8w 4

6h8w � 4

6h�w

56h

8w � 56h�w 4

6h�w . 5

6h8w

&

hD.E @

�h5 5h7 � 5h5

3 h7

�hDhE @

�h5 h5 . h7

3 h7

GhwFG�4 @

57 4 w 4

5 w5 . 6w

3 4 w3 3 4

68 hGwFG

�4

@

57 4 w 4

5 w5 . 6w

3 4 w3 3 4

68

Note that one of the properties of exponents that holds for real numbers fails formatrices. The equality hD.E @ hDhE requires that DE @ ED, and this property failsto hold for the matrices in the example. However, exponentiation preserves the propertyof similarity, as demonstrated by GhwFG�4 @ hGwFG

�4

.

Polynomials and Vectors Associated With a Matrix

A square matrix has characteristic and minimum polynomials, eigenvalues and eigen-vectors.

Characteristic Polynomial and Minimum Polynomial

Thefkdudfwhulvwlf sro|qrpldo of a square matrixD is the determinant of the charac-teristic matrix{L �D.

L Matrices + Characteristic Polynomial

3C 7 4 3

3 7 33 3 7

4D, characteristic polynomial:+[ � 7,6

Page 28: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

286 Chapter 8 Matrices and Matrix Algebra

L Evaluate

[

3C 4 3 3

3 4 33 3 4

4D�

3C 7 4 3

3 7 33 3 7

4D @

3C �7 .[ �4 3

3 �7 .[ 33 3 �7 .[

4D

ghw

3C �7 .[ �4 3

3 �7 .[ 33 3 �7 .[

4D @ +[ � 7,6

The plqlpxp sro|qrpldo of a square matrix D is the monic polynomial s+{, ofsmallest degree such that s+D, @ 3. By the Cayley–Hamilton theorem ,i+D, @ 3 ifi+{, is the characteristic polynomial ofD. The minimum polynomial ofD is a factor ofthe characteristic polynomial ofD.

L Matrices + Minimum Polynomial, Factor

3C 7 4 3

3 7 33 3 7

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

Example 79 This example illustrates the Cayley–Hamilton theorem.

De¿nes+[, @ [5 � ;[ . 49 andD @

3C 7 4 3

3 7 33 3 7

4D.

With Maple, applyEvaluate twice to get the following.

s+D, @ D5 � ;D. 49 @

3C 3 3 3

3 3 33 3 3

4D

The minimum and characteristic polynomial operations have to return a variable forthe polynomial. In the preceding examples, they returned[. However, the variable useddepends on the matrix entries and you do not need to avoid[ in the matrix. This pointis illustrated in the following examples.

L Matrices + Minimum Polynomial

�6[ {8 |

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

�� {[ |

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

Page 29: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Polynomials and Vectors Associated With a Matrix 287

Eigenvalues and Eigenvectors

Given a matrix D, the matrix commands Eigenvectors and Eigenvalues on the Ma-trices 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 getan exact symbolic solution.

These scalars and vectors are sometimes calledfkdudfwhulvwlf values andfkdudf0whulvwlf vectors. The eigenvalues, or characteristic values, are roots of the characteristicpolynomial.

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 theeigenvaluefrv�. l vlq� and applyingSimplify gives

+frv�. l vlq�,5 � 5 +frv�. l vlq�, frv�. 4 @ 3

demonstrating that eigenvalues are roots of the characteristic polynomial. Note the dif-ferent results obtained using integer versusÀoating-point entries.

L Matrices + Eigenvalues

�4 56 7

�, eigenvalues:85 .

45

s66> 85 � 4

5

s66

�4=3 56 7

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

When you chooseEigenvectors from theMatrices 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 56 7

�, eigenvectors:

��46�� 7

64

��' � where� is a root of]5 � 8] � 5

In the preceding example,� denotes an eigenvalue, and4 indicates that eigenvalue’smultiplicity as a root of the characteristic polynomial. The roots of the polynomial]5 � 8] � 5 are the eigenvalues computed earlier:8

5 . 45

s66 and 8

5 � 45

s66=

For� @ 85 4

5

s66, the corresponding eigenvector is�

445�� 4

5

�@

�4

45

�85 4

5

s66�� 4

5

�@

�4

67 4

7

s66

�The products of the matrix with these eigenvectors and eigenvalues are as follows.

Page 30: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

288 Chapter 8 Matrices and Matrix Algebra

L Evaluate

�4 56 7

��4

6.s66

7

�@

#8.s66

5

9 .s66

$>

8.s66

5

�4

6.s66

7

�@

�85 .

45

s66

9 .s66

�4 56 7

��4

6�s667

�@

#8�s66

5

9�s66

$>

8�s665

�4

6�s667

�@

�85 � 4

5

s66

9�s66

Thus, both roots give an eigenvalue–eigenvector pair.

L Matrices + Eigenvectors

3C 8 �9 �9

�4 7 56 �9 �7

4D, eigenvectors:

;?=3C 5

34

4D >

3C 5

43

4D<@> ' 5>

;?=3C �6

4�6

4D<@> ' 4

In the preceding example,5 is an eigenvalue occurring with multiplicity5, and4 isan eigenvalue occurring with multiplicity4. The de¿ning propertyDy @ fy is illustratedby the following.

L Evaluate3C 8 �9 �9

�4 7 56 �9 �7

4D

3C 5

43

4D @

3C 7

53

4D, 5

3C 5

43

4D @

3C 7

53

4D

3C 8 �9 �9

�4 7 56 �9 �7

4D

3C 5

34

4D @

3C 7

35

4D > 5

3C 5

34

4D @

3C 7

35

4D

Positive De¿nite Symmetric Matrices

A symmetric matrixD is srvlwlyh gh�qlwh if any of the following equivalent conditionshold: all the eigenvalues ofD are positive� the product{WD{ A 3 for all nonzero vectors{� or there exists a nonsingular matrixZ such thatD @ ZWZ .

Page 31: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Vector Spaces Associated With a Matrix 289

A symmetric matrix D is srvlwlyh vhplgh�qlwh if all the eigenvalues of D arenonnegative, is qhjdwlyh gh�qlwh if all the eigenvalues are negative, and is qhjdwlyhvhplgh�qlwh if all the eigenvalues are nonpositive.

L Matrices + De¿niteness Tests

�5 �4�4 5

�, eigenvalues: 6> 4>

qhjdwlyh gh�qlwh> falseqhjdwlyh vhplgh�qlwh> falsesrvlwlyh vhplgh�qlwh> truesrvlwlyh gh�qlwh> true

�4 �4�4 4

�, eigenvalues: 3> 5>

qhjdwlyh gh�qlwh> falseqhjdwlyh vhplgh�qlwh> falsesrvlwlyh vhplgh�qlwh> truesrvlwlyh gh�qlwh> false

Vector Spaces Associated With a Matrix

There are four vector spaces naturally associated with an p � q matrix D: the rowspace, the column space, and the left and right nullspaces. A edvlv for a vector space isa 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 Basis5997

�;8 �88 �6: �68<: 83 :< 897< 96 8: �8<

�69 ; 53 �<7

6::8, row basis:

�4 3 3

46666:

9;597

�>

�3 4 3 �:737<

67465

�>

�3 3 4 �63;8

<:85

You can ¿nd other bases for the row space by choosing Reduced Row EchelonForm from the Matrices submenu, or by applying Fraction-Free Gaussian Elimina-tion and then taking the nonzero rows from the result.

Page 32: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

290 Chapter 8 Matrices and Matrix Algebra

L Matrices + Reduced Row Echelon Form

5997

�;8 �88 �6: �68<: 83 :< 897< 96 8: �8<

�69 ; 53 �<7

6::8, row echelon form:

599999997

4 3 346666:

9;597

3 4 3 �:737<

67465

3 3 4 �63;8

<:853 3 3 3

6:::::::8

The preceding calculation gives the same basis as found in the previous example.

L Matrices + Fraction-free Gaussian Elimination5997

�;8 �88 �6: �68<: 83 :< 897< 96 8: �8<

�69 ; 53 �<7

6::8, fraction-free Gaussian elimination:

5997

�;8 �88 �6: �683 43;8 �6459 �46983 3 46985; �764<33 3 3 3

6::8

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

Thefroxpq vsdfh is the vector space spanned by the columns ofD.

L To ¿nd a basis for the column space

1. Leave the insertion point in the matrix.

2. From theMatrices submenu, chooseColumn Basis.

L Matrices + Column Basis5997

�;8 �88 �6: �68<: 83 :< 897< 96 8: �8<

�69 ; 53 �<7

6::8, column basis:

5997

3433

6::8 >

5997

4334

6::8 >

5997

3344

6::8

Page 33: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Vector Spaces Associated With a Matrix 291

You can also take the transpose of D and apply Fraction-Free Gaussian Elimina-tion 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 [ satisfyingD[ @ 3. You ¿nd a basis for the nullspace by choosing Nullspace Basis from theMatrices submenu.

L Matrices + Nullspace Basis

5997

�;8 �88 �6: �68<: 83 :< 897< 96 8: �8<

�69 ; 53 �<7

6::8, nullspace basis:

599999997

�46666:

9;597:737<

6746563;8

<:854

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 andthen choosing Nullspace Basis from the Matrices submenu.

L Evaluate

5997

�;8 �88 �6: �68<: 83 :< 897< 96 8: �8<

�69 ; 53 �<7

6::8W

@

5997

�;8 <: 7< �69�88 83 96 ;�6: :< 8: 53�68 89 �8< �<7

6::8

L Matrices + Nullspace Basis

5997

�;8 <: 7< �69�88 83 96 ;�6: :< 8: 53�68 89 �8< �<7

6::8, nullspace basis:

;AA?AA=

5997

434

�4

6::8<AA@AA>

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

Page 34: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

292 Chapter 8 Matrices and Matrix Algebra

L Evaluate

5997

434

�4

6::8W 5997

�;8 �88 �6: �68<: 83 :< 897< 96 8: �8<

�69 ; 53 �<7

6::8 @

�3 3 3 3

The QR Factorization and Orthonormal Bases

Any real matrix D with linearly independent columns can be factored as a productTU, where the columns of T are ruwkrqrupdo (the inner product of any two differ-ent columns is3, and the inner product of any column with itself is4) andU is invertibleand upper-right triangular. If the original matrixD is square, then so isT. In this case,T is anruwkrjrqdo matrix.

L To obtain the TU factorization

1. Leave the insertion point in a matrix.

2. From theMatrices submenu, chooseQR Decomposition.

L Matrices + QR Decomposition

�6 37 8

�@

� �=9 =;�=; �=9

�� �8=3 �7=33 �6=3

The two matricesT andD @ TU have the same column spaces. Observe, in thefollowing example, that the columns ofD are linear combinations of the columns ofT.Then, since both column spaces have dimension5 and one contains the other, it followsthat they must be the same space.

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

�@ �8

� �=9�=;

�. 3

�=;�=9

�and �

38

�@ �7

� �=9�=;

�� 6

�=;�=9

This conversion of the columns ofD into the orthonormal columns ofT is referredto as theJudp~Vfkplgw ruwkrjrqdol}dwlrq process. In general, sinceU is upper-righttriangular, the subspace spanned by the¿rst n columns of the matrixD @ TU is thesame as the subspace spanned by the¿rstn columns of the matrixT.

Page 35: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

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 dimen-sion of the row space or the number of nonzero singular values.

L Matrices + Rank5997

�; �8 : �5: 8 < 84 3 �49 �6; 8 �: 5

6::8, rank:5

L Matrices + Row Basis5997

�; �8 : �5: 8 < 84 3 �49 �6; 8 �: 5

6::8, row basis:

��4 3 �49 �6

�>�3 4 454

8598

��

L Matrices + Column Basis5997

�; �8 : �5: 8 < 84 3 �49 �6; 8 �: 5

6::8, column basis:

5997

34

�43

6::8 >

5997

43

�4�4

6::8

Special Forms of Matrices

Several normal forms of matrices can be obtained.

Smith Normal Form

Two q � q matricesD andE arehtxlydohqw if one can be obtained from the other bya sequence of elementary row and column operations. In other words,E @ TDS forsome invertible matricesT andS .

Any matrix D with polynomial entries is equivalent to a diagonal matrix of theform gldj+4> = = = > 4> s4> s5> = = = > sn> 3> = = = > 3,, where3 � ghj+s4, � ghj+s5, � = = = �ghj+sn, and for eachl, sl is a factor ofsl.4. This matrix, which is uniquely determinedby D, is called theVplwk qrupdo irup of D. Two square matrices with polynomialentries are equivalent if and only if they have the same Smith normal form.

Page 36: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

294 Chapter 8 Matrices and Matrix Algebra

L Matrices + Smith Normal Form

D @

�{6 . 6{� 4 {5 � 6{. 8{6 . 8{5 {7 . 6{5

Smith normal form:

�4 33 {: . 8{8 � 6{7 . 4<{6 � 5;{5

E @

�<: 83:< 89

��{6 . 6{� 4 {5 � 6{. 8{6 . 8{5 {7 . 6{5

� � �;8 �88�6: �68

�,

Smith normal form:�

4 33 {: . 8{8 � 6{7 . 4<{6 � 5;{5

Two q � q matrices D and E are vlplodu if there is an invertible q � q matrix Fsuch that E @ F�4DF.

Example 81 Two matrices are similar if and only if their characteristic matrices {L�Dand {L�E are equivalent, which is the same as saying that {L�D and {L�E have thesame Smith normal form. To demonstrate this relationship, take two similar matrices.

D @

�4 56 7

E @

�4 <

�6 7

��4 �4 56 7

� �4 <

�6 7

�@

597

94

64�64<

64

�57

64

<7

64

6:8

These matrices have the following characteristic matrices

{L �D @

�{ 33 {

���

4 56 7

�@

�{� 4 �5�6 {� 7

{L �E @

�{ 33 {

��

597

94

64�64<

64

�57

64

<7

64

6:8 @

597 {� 94

64

64<

6457

64{� <7

64

6:8

with Smith normal forms both equal to�4 33 {5 � 8{� 5

Rational Canonical Form

The frpsdqlrq pdwul{ of a monic polynomial d3. d4[ . � � �. dq�4[q�4.[q ofdegree q is the q� q matrix with a subdiagonal of ones, ¿nal column� �d3 �d4 � � � �dq�4

�W

Page 37: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Special Forms of Matrices 295

and other entries zero.

L Polynomials + Companion Matrix

{7 . 6{5 � 5{. 4, Companion matrix:

5997

3 3 3 �44 3 3 53 4 3 �63 3 4 3

6::8

{6 . d{5 . e{. f, Companion matrix:

57 3 3 �f

4 3 �e3 4 �d

68

Note that the ¿rst of the following matrices is the companion matrix of its own char-acteristic and minimum polynomials.

L Matrices + Minimum Polynomial

3EEEEC

3 3 3 3 �d4 3 3 3 �e3 4 3 3 �f3 3 4 3 �g3 3 3 4 �h

4FFFFD, minimum polynomial:

d. e[ . f[5 . g[6 . h[7 .[8

ChoosingRational Canonical Form from theMatrices submenu produces a factor-ization of a square matrix asSIS�4, whereI is in rational canonical form. Audwlrqdofdqrqlfdo irup, sometimes called aIurehqlxv irup, is a block diagonal matrix witheach 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 poly-nomial of the original matrix. The polynomials that determine the blocks of the rationalcanonical form sequentially divide one another.

L Matrices + Rational Canonical Form

57 4 5 6

7 8 9: ; <

68 @

57 4 4 63

3 7 993 : 435

6857 3 3 3

4 3 4;3 4 48

6859997

4 �5 4

3 �4:

<

44

<

3:

87� 5

5:

6:::8

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

Page 38: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

296 Chapter 8 Matrices and Matrix Algebra

L Evaluate

{

3C 4 3 3

3 4 33 3 4

4D�

57 4 5 6

7 8 9: ; <

68 @

57 {� 4 �5 �6

�7 {� 8 �9�: �; {� <

68

L Matrices + Smith Normal Form

57 {� 4 �5 �6

�7 {� 8 �9�: �; {� <

68, Smith normal form:

57 4 3 3

3 4 33 3 �4;{� 48{5 . {6

68

The polynomial occurring in the preceding Smith normal form has its coef¿cientsdisplayed in the rational canonical form shown previously.

L Matrices + Rational Canonical Form

57 8 �9 �9

�4 7 56 �9 �7

68 @

57 4 8 5

3 �4 33 6 4

6857 3 �5 3

4 6 33 3 5

6857 4 �4 �5

3 �4 33 6 4

68

There are two blocks in the preceding rational canonical form:

1. The companion matrix�

3 �54 6

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

2. The companion matrix ^ 5 ` of [ � 5

L Matrices + Characteristic Polynomial, Factor

57 8 �9 �9

�4 7 56 �9 �7

68, characteristic polynomial:

[6 . ;[ � 8[5 � 7 @ +[ � 4, +[ � 5,5

L Matrices + Minimum Polynomial, Factor

57 8 �9 �9

�4 7 56 �9 �7

68, minimum polynomial: 5� 6[ .[5 @ +[ � 4, +[ � 5,

Page 39: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Special Forms of Matrices 297

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

{

57 4 3 3

3 4 33 3 4

68�

57 8 �9 �9

�4 7 56 �9 �7

68 @

57 {� 8 9 9

4 {� 7 �5�6 9 {. 7

68

L Matrices + Smith Normal Form

57 {� 8 9 9

4 {� 7 �5�6 9 {. 7

68, Smith normal form:

57 4 3 3

3 {� 5 33 3 5� 6{. {5

68

These two examples illustrate a relationship among the Smith normal form, the char-acteristic matrix, and the rational canonical form of a matrix.

Note The Smith normal form of the characteristic matrix ofD displays the factors ofthe characteristic polynomial ofD that determine the rational canonical form ofD=

Jordan Form

ChoosingJordan Form from the Matrices submenu produces a factorization of asquare matrix asSMS�4, whereM is in Jordan form. This form is a block diagonalmatrix with each block an elementary Jordan matrix. More speci¿cally, theMrugdqirup of anq� q matrixD is a matrix of the form

M+D, @

59997

Mq4 +�4, 3 � � � 33 Mq5 +�5, � � � 3...

......

...3 3 � � � Mqn +�n,

6:::8

whereq4.q5.� � �.qn @ q, and each diagonal blockMql +�l, is anql�ql hohphqwdu|Mrugdq pdwul{ of the form

Mql +�l, @

5999997

�l 4 � � � 3 33 �l � � � 3 3...

......

......

3 3 � � � �l 43 3 � � � 3 �l

6:::::8

Page 40: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

298 Chapter 8 Matrices and Matrix Algebra

L Matrices + Jordan Form

57 5 �4 3

�4 5 �43 �4 5

68 @

597

45

47

47

3 47

s5 �4

7

s5

�45

47

47

6:85997

5 3 3

3 5�s5 3

3 3 5 .s5

6::85997

4 3 �4

4s5 4

4 �s5 4

6::8

Thus, the Jordan form is

M

3C57 5 �4 3

�4 5 �43 �4 5

684D @

57 5 3 3

3 5�s5 3

3 3 5 .s5

68

In this case, M+D, is diagonal, so each Mql +�l, is a 4� 4 matrix. The matrix

D @

3C 5 �4 3

�4 5 �43 �4 5

4D

has characteristic and minimum polynomials

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

5��

[ � 5 .s5�

whose roots�5> 5 .

s5> 5�s

5�

are the diagonal entries of the Jordan form.

L Matrices + Jordan Form

5997

5 3 3 34 5 3 33 3 5 33 3 �6 5

6::8 @

5997

3 4 3 34 3 3 33 3 3 43 3 �6 3

6::85997

5 4 3 33 5 3 33 3 5 43 3 3 5

6::85997

3 4 3 34 3 3 33 3 3 �4

63 3 4 3

6::8

Thus, the Jordan form is

M

3EEC5997

5 3 3 34 5 3 33 3 5 33 3 �6 5

6::84FFD @

5997

5 4 3 33 5 3 33 3 5 43 3 3 5

6::8

In this case, Mq4 +�4, @ Mq5 +�5, @

�5 43 5

�, the companion matrix of the mini-

mum polynomial of

D @

5997

5 3 3 34 5 3 33 3 5 33 3 �6 5

6::8

The matrixD has characteristic polynomial+[ � 5,7 with rootsi5> 5> 5> 5j, and min-imum polynomial[5 � 7[ . 7 @ +[ � 5,5.

Page 41: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Special Forms of Matrices 299

L Matrices + Jordan Form5997

5 3 3 33 5 3 33 3 5 33 3 3 5

6::8 @

5997

4 3 3 33 4 3 33 3 4 33 3 3 4

6::85997

5 3 3 33 5 3 33 3 5 33 3 3 5

6::85997

4 3 3 33 4 3 33 3 4 33 3 3 4

6::8

The preceding matrix is already in Jordan form. It has minimum polynomial [ �5 and characteristic polynomial +[ � 5,7, the same characteristic polynomial as theprevious one, but a different minimum polynomial and a different Jordan form.

L Matrices + Jordan Form��4 5

�4 �4

��@

�45 � 4

5 l45 .

45 l

45 l �4

5 l

��l 33 �l

��4 4� l4 4 . l

In this case, Mq4 +�4, @ ^l` and Mq5 +�5, @ ^�l` are 4 � 4 matrices. The matrix�4 5

�4 �4

�has characteristic and minimum polynomial {5 . 4 @ +{. l, +{� l, =

Orthogonal Matrices

An ruwkrjrqdo pdwul{ is a real matrix for which the inner product of any two differentcolumns is zero and the inner product of any column with itself is one. The matrix issaid to have ruwkrqrupdo columns. Such a matrix necessarily has orthonormal rows aswell.

L Matrices + Orthogonality Test

�frv� � vlq�vlq� frv�

�, orthogonal? wuxh

3C 3 3 4

4 3 33 4 3

4D, orthogonal? wuxh

�3 44 4

�, orthogonal? idovh

Singular Value Decomposition (SVD)

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

Page 42: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

300 Chapter 8 Matrices and Matrix Algebra

positive numbers in the ¿rst rank-D entries on the main diagonal and zeroes everywhereelse. The entries on the main diagonal ofG are called thesingular values of D. ThisfactorizationD @ XGY is called asingular value decomposition of D.

L Matrices + Singular Values

57 8 �8 �6

�6 3 84=3 8 7

68, singular values:i6=89> 7=94> 43=4j

�8 �8 �6�6 3 8

�, singular values:

�s47>

s:<�@ i6=:7> ;=;<j

L Matrices + SVD

57 8 �8 �6

�6 3 84 8 7

68 @

57 �=:55 �=4<4 �=998

=788 =8<6 �=997=855 �=:;5 �=674

6857 43=4 3 3

3 7=94 33 3 6=89

6857 �=776 =94; =97<

�=:96 �=973 =3;<:�=7:4 =789 �=:88

68

These two outer matrices fail the orthogonality test because they are numerical ap-proximations 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=36 7

�, singular values:i=699> 8=7:j

�4 56 7

�@

� �=738 �=<48�=<48 =738

��8=7: 33 =699

�� �=8:9 �=;4:=;4: �=8:9

PLU Decomposition

Any p� q real matrixD can be factored into a productD @ SOX , with O andX reallower and upper triangularp � p andp � q matrices, respectively, with4’s on themain diagonal ofO, and withS a permutation matrix. This factorizationD @ SOX iscalled theSOX ghfrpsrvlwlrq of D. The matrixX is an echelon form ofD.

Page 43: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Exercises 301

L Matrices + PLU Decomposition

57 4 5 6

5 7 96 5 4

68 @

57 4 3 3

3 3 43 4 3

6857 4 3 3

6 4 35 3 4

6857 4 5 6

3 �7 �;3 3 3

68

57 5 �8 �6 �8

: 8 < 97 6 8 �<

68 @

57 4 3 3

3 4 33 3 4

6857 4 3 3

:5 4 3

5 5978 4

6857 5 �8 �6 �8

3 785

6<5

7:5

3 3 � 748 �899

78

68

57 78 �;

�<6 <576 �95

68 @

57 4 3 3

3 4 33 3 4

6857 4 3 3

�6448 4 37678 �4556

49<; 4

6857 78 �;

3 446548

3 3

68

�=865 4=<84=8 =3346

�@

�3 4=34=3 3

� �4=3 3

= 687 9: 4=3

��4= 8 =33 463 4= <7< 8

��

3 33 3

�@

�4 33 4

��4 33 4

��3 33 3

Note that the upper triangular matrix in the ¿rst example is the same as the following.

L Matrices + Fraction-Free Gaussian Elimination57 4 5 6

5 7 96 5 4

68, fraction-free Gaussian elimination:

57 4 5 6

3 �7 �;3 3 3

68

In general, the upper triangular matrix in the PLU decomposition is the echelon formof the original matrix obtained by Gaussian elimination.

Exercises

1. The vectorsx @�4 4 3

�andy @

�4 4 4

�span a plane inU6= Find the

projection matrixS onto the plane, and¿nd a nonzero vectore that is projected tozero.

2. For the following matrix,¿nd the characteristic polynomial, minimum polynomial,eigenvalues, and eigenvectors. Discuss the relationships among these, and explainthe multiplicity of the eigenvalue.5

9975 3 3 34 5 3 33 3 5 33 3 �6 5

6::8

Page 44: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

302 Chapter 8 Matrices and Matrix Algebra

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

�4 4 44 3 5

�?

The set of all solutions { @

57 {4

{5{6

68 of the equation D{ @

�33

�is the column

space of D� the row space of D� a nullspace of D� a plane� a line� a point.

4. The matrices that rotate the {|-plane areD +�, @

�frv � � vlq �vlq � frv �

�. Verify

thatD +�,D +*, @ D +� . *, andD +��, @ D +�,�4, using matrix products andtrigonometric identities.

Solutions

1. The projection matrixS onto the plane inU6 spanned by the vectorsx @ ^4> 4> 3`

andy @ ^4> 4> 4` is the productS @ D�DWD

��4DW , wherex andy are the columns

of D.

� S @

57 4 4

4 43 4

683EC57 4 4

4 43 4

68W 57 4 4

4 43 4

684FD�4 5

7 4 44 43 4

68W

@

57

45

45 3

45

45 3

3 3 4

68

Note thatSz is a linear combination ofx andy for any vectorz @ +{> |> }, in U6,

soS mapsU6 onto the plane spanned byx andy.

�57 4

545 3

45

45 3

3 3 4

6857 {

|}

68 @

57 4

5{. 45|

45{. 4

5|}

68 @

�{. |

5� }

� 57 4

43

68. }

57 4

44

68

To ¿nd a nonzero vectore that is projected to zero, leave the insertion point in thematrixS , and from theMatrices submenu chooseNullspace Basis.

�57

45

45 3

45

45 3

3 3 4

68, nullspace basis:

;?=57 �4

43

68<@>

2. The matrix

5997

5 3 3 34 5 3 33 3 5 33 3 �6 5

6::8 has characteristic polynomial+[ � 5,7, minimum

polynomial7� 7[ .[5 @ +[ � 5,5, and eigenvalue and eigenvectors;AA?AA=5> 7>

5997

3334

6::8 >

5997

3433

6::8<AA@AA>

Page 45: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

Solutions 303

The minimal polynomial is a factor of the characteristic polynomial. The eigenvalue5 occurs with multiplicity 7 as a root of the characteristic polynomial +[ � 5,7. Theeigenvalue 5 has two linearly independent eigenvectors. Note that

5997

5 3 3 34 5 3 33 3 5 33 3 �6 5

6::85997

3334

6::8 @

5997

3335

6::8 @ 5

5997

3334

6::8

5997

5 3 3 34 5 3 33 3 5 33 3 �6 5

6::85997

3433

6::8 @

5997

3533

6::8 @ 5

5997

3433

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 de¿nition of nullspace� consequently, this set is a subspace of U6. The

product of D with the ¿rst row of D is�

4 4 44 3 5

�57 444

68 @

�66

�, which is not

�33

�, so the solution set is not the row space of D.

To determine whether this subspace of U6 is a point, line, or plane, solve the systemof equations: from the Solve submenu, choose Exact�

4 4 44 3 5

�57 {4{5{6

68 @

�33

�, Solution is:

57 �5w4

w4w4

68

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.

� New De¿nition: D +�, @

�frv � � vlq �vlq � frv �

�� Evaluate, Evaluate:

D +�,D +*, @

�frv � � vlq �vlq � frv �

��frv* � vlq*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

Page 46: 8 Matrices and Matrix Algebra - SLAC National … file8 Matrices and Matrix Algebra Matrices are used throughout mathematics and in related ¿elds such as physics, engi-neering, economics,

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 +��, @

�frv � � vlq �vlq � frv �

��frv � vlq �

� vlq � frv �

�� Evaluate �

frv � � vlq �vlq � frv �

��frv � vlq �

� vlq � frv �

�@

�frv5 � . vlq5 � 3

3 frv5 � . vlq5 �

�� Leave the insertion point in the matrix and choose Simplify, or from the Com-

bine submenu choose Trig Functions.�frv5 � . vlq5 � 3

3 frv5 � . vlq5 �

�@

�4 33 4