27.3. MATLAB AND DETERMINANTS 513

Example 27.2.11 Solve for z if 1 0 00 et cos t et sin t0 −et sin t et cos t

 x

yz

=

 1tt2

You could do it by row operations but it might be easier in this case to use Cramer’s

rule because the matrix of coefficients does not consist of numbers but of functions. Thus

z =

∣∣∣∣∣∣∣1 0 10 et cos t t0 −et sin t t2

∣∣∣∣∣∣∣∣∣∣∣∣∣∣1 0 00 et cos t et sin t0 −et sin t et cos t

∣∣∣∣∣∣∣= t ((cos t) t + sin t)e−t .

You end up doing this sort of thing sometimes in ordinary differential equations in themethod of variation of parameters.

27.3 MATLAB And DeterminantsMATLAB can find determinants. Here is an example.

>> A=[1,3,2,4;-5,7,2,3;2,3,7,11;1,2,3,4]; det(A)Then press enter and you getans =-102.0000To enter a complex number 1+ 2i for example, you type: complex(1,2). However,

when matlab gives the answer, it will write it in the usual form 1+ 2i. If you have ma-trices in which there are complex entries, you can go ahead and let matlab do the tediouscomputations for you.

27.4 The Cayley Hamilton Theorem∗

Definition 27.4.1 Let A be an n×n matrix. The characteristic polynomial is defined as

qA (t)≡ det(tI−A)

and the solutions to qA (t) = 0 are called eigenvalues. For A a matrix and p(t) = tn +an−1tn−1 + · · ·+a1t +a0, denote by p(A) the matrix defined by

p(A)≡ An +an−1An−1 + · · ·+a1A+a0I.

The explanation for the last term is that A0 is interpreted as I, the identity matrix.

The Cayley Hamilton theorem states that every matrix satisfies its characteristic equa-tion, that equation defined by qA (t) = 0. It is one of the most important theorems in linear

27.3. MATLAB AND DETERMINANTS 513Example 27.2.11 Solve for z if1 0 0 x 10 efcost e'sint y |=| ¢0 —e'sint e'cost Zz 2You could do it by row operations but it might be easier in this case to use Cramer’srule because the matrix of coefficients does not consist of numbers but of functions. Thus1 0 10 e'cost ft0 —e'sint ft?1 0 00 e'cost e‘sint=t((cost)t+sinr)e’.0 —e'sint e'costYou end up doing this sort of thing sometimes in ordinary differential equations in themethod of variation of parameters.27.3 MATLAB And DeterminantsMATLAB can find determinants. Here is an example.>> A=[1,3,2,4;-5,7,2,3;2,3,7,1151,2,3,4]; det(A)Then press enter and you getans =- 102.0000To enter a complex number | + 2i for example, you type: complex(1,2). However,when matlab gives the answer, it will write it in the usual form | + 27. If you have ma-trices in which there are complex entries, you can go ahead and let matlab do the tediouscomputations for you.27.4 The Cayley Hamilton Theorem*Definition 27.4.1 Let A be ann x n matrix. The characteristic polynomial is defined asqa (t) = det (tI — A)and the solutions to qa(t) = 0 are called eigenvalues. For A a matrix and p(t) = t" +yt"! +-++»+a,t +a, denote by p(A) the matrix defined byp(A) =A" +a,-1A" | 4+-+-+ajA+aol.The explanation for the last term is that A° is interpreted as I, the identity matrix.The Cayley Hamilton theorem states that every matrix satisfies its characteristic equa-tion, that equation defined by qa (t) = 0. It is one of the most important theorems in linear