0% found this document useful (0 votes)
200 views5 pages

Matlab Eigenvalues

This document discusses two applications of matrices: solving systems of linear equations and eigenvalue problems. It provides an example of using matrix operations to solve a system of 3 equations with 3 unknowns. It also explains what eigenvalues and eigenvectors are and provides an example of finding the eigenvalues and eigenvectors of a 2x2 matrix.

Uploaded by

umunera2997
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views5 pages

Matlab Eigenvalues

This document discusses two applications of matrices: solving systems of linear equations and eigenvalue problems. It provides an example of using matrix operations to solve a system of 3 equations with 3 unknowns. It also explains what eigenvalues and eigenvectors are and provides an example of finding the eigenvalues and eigenvectors of a 2x2 matrix.

Uploaded by

umunera2997
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Some Matrix Applications

This page is a brief introduction to two applications of matrices - the solution of multiple
equations, and eigenvalue/eigenvector problems (don't worry if you haven't heard of the
latter). Before reading this you should feel comfortable with basic matrix operations. If
you are confident in your ability with this material, feel free to skip it.
Note that there is no description of how the operations are done -- it is assumed that you
are using a calculator that can handle matrices, or a program like MatLab. Also, this
page typically only deals with the most general cases, there are likely to be special cases
that aren't covered at all.
Solution of Linear Systems of Algebraic Equations
Consider a linear system of algebraic equations with n equations and n
unknowns:

In these equations, a
ij
and b
i
are constants, and the unknowns are x
i
. We can
rewrite the equations as:

where

We can find all the unknowns in the vector x by doing a few simple matrix
manipulations. If we premultiply both sides of the matrix equation by the
inverse of the A matrix we get:
Page 1 of 5 Eigenvalues and Eigenvectors

which gives us our solution.
Note: This discussion has assumed that all the equations are independent, i.e. that you can't
form one of the equations from combinations of other equations.
An Example
Consider the system of 3 equations and 3 unknowns:

Clearly,

Using MatLab
A=[2 3 1;-1 2 3;0 1 2]
A =
2 3 1
-1 2 3
0 1 2
b=[-1 9 5]'
b =
-1
9
5

x=inv(A)*b
x =
Page 2 of 5 Eigenvalues and Eigenvectors
-1.5714
-0.1429
2.5714
Eigenvalues and Eigenvectors
Many problems present themselves in terms of an eigenvalue problem:

In this equation A is an n-by-n matrix, v is a non-zero n-by-1 vector and is a
scalar (which may be either real or complex). Any value of for which this
equation has a solution is known as an eigenvalue of the matrix A. It is
sometimes also called the characteristic value. The vector, v, which
corresponds to this value is called an eigenvector. The eigenvalue problem can
be rewritten as

If v is non-zero, this equation will only have a solution if

This equation is called the characteristic equation of A, and is an n
th
order
polynomial in with n roots. These roots are called the eigenvalues of A. We
will only deal with the case of n distinct roots, though they may in fact be
repeated. For each eigenvalue there will be an eigenvector for which the
eigenvalue equation is true.
Example
If

then the characteristic equation is
Page 3 of 5 Eigenvalues and Eigenvectors

and the two eigenvalues are

All that's left is to find the two eigenvectors. Let's find the
eigenvector, v
1
, associated with the eigenvector,
1
, first.


so clearly

and the first eigenvector is any 2 element column vector in which the
two elements have equal magnitude and opposite sign.

where k
1
is an arbitrary constant. Note that we didn't have to use +1
and -1, we could have used any two quantities of equal magnitude and
opposite sign.
Going through the same procedure for the second eigenvalue:
Page 4 of 5 Eigenvalues and Eigenvectors

Using MatLab
A=[0 1;-2 -3]
A =
0 1
-2 -3
[v,d]=eig(A)
v =
0.7071 -0.4472
-0.7071 0.8944

d =
-1 0
0 -2
The eigenvalues are the diagonal of the "d" matrix;
1
=-1,

2
=-2. The eigenvectors are the columns of the "v" matrix.
Note that MatLab chose different values for v
1,1
, etc..., but
that the ratio of v
1,1
to v
1,2
and the ratio of v
2,1
to v
2,2
are
the same as our solution. (MatLab chooses the values such
that the sum of the squares of the elements of the eigenvector
equals unity).

Page 5 of 5 Eigenvalues and Eigenvectors

You might also like