Page 28 - MATLAB an introduction with applications
P. 28
MATLAB Basics ——— 13
1.10.8 Determinant
A determinant is a scalar computed from the entries in a square matrix. For a 2 × 2 matrix A, the determinant is
|A| = a a – a a 12
21
22
11
MATLAB will compute the determinant of a matrix using the det function:
det(A): Computes the determinant of a square matrix A.
1.10.9 Array Division
MATLAB has two types of array division, which are the left division and the right division.
1.10.10 Left Division
The left division is used to solve the matrix equation Ax = B where x and B are column vectors. Multiplying
both sides of this equation by the inverse of A, A , we have
–1
–1
–1
A Ax = A B
–1
or Ix = x = A B
–1
Hence x = A B
In MATLAB, the above equation is written by using the left division character:
x = A \ B
1.10.11 Right Division
The right division is used to solve the matrix equation xA = B where x and B are row vectors. Multiplying both
sides of this equation by the inverse of A, A , we have
–1
–1
x * AA = B * A –1
or x = B * A –1
In MATLAB, this equation is written by using the right division character:
x = B/A
1.10.12 Eigenvalues and Eigenvectors
Consider the following equation:
AX = λX ...(1.1)
where A is an n × n square matrix, X is a column vector with n rows and λ is a scalar.
The values of λ for which X are non-zero are called the eigenvalues of the matrix A, and the corresponding
values of X are called the eigenvectors of the matrix A.
Equation (1.1) can also be used to find the following equation:
(A – λI)X = 0 ...(1.2)
where I is an n × n identity matrix. Equation (1.2) corresponding to a set of homogeneous equations and has
non-trivial solutions only if the determinant is equal to zero, or
|A – λI| = 0 ...(1.3)
Equation (1.3) is known as the characteristic equation of the matrix A. The solution to Eq.(1.3) gives the
eigenvalues of the matrix A.
F:\Final Book\Sanjay\IIIrd Printout\Dt. 10-03-09