Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: "Diagonalizing" a non-symmetric matrix


From   May Boggess <[email protected]>
To   [email protected]
Subject   Re: st: RE: "Diagonalizing" a non-symmetric matrix
Date   02 Oct 2003 11:31:38 -0500

Pinaki Mitra has asked for help with diagonalization:

> I have a 88 by 88 square matrix (but NOT symmetric). 
> I would like to diagonalize it so that the eigen values 
> will be in the diagonals and all off-diagonals will zero. 

In addition to Nic Cox's response,
Clyde Schechter has responded by saying (in part):

> In fact, it's fairly simple linear algebra to show
> that any matrix of real numbers which _can_ be diagonalized is 
> necessarily symmetric!  So it's unclear what M.P. is trying to do.

This is true if we mean "diagonalization" to mean "diagonalization
with an orthogonal matrix". The issue here is are we talking about

(1)    A = P D P^(-1)

or

(2)   A = P D P'     (' means transpose)

When P, the matrix containing the eigenvectors of A in its columns, is 
orthogonal (ie. A has orthogonal eigenvectors), P^(-1)=P'. This happens
if and only if A is symmetric and A is diagonalized as in equation (2).

However, A doesn't have to be symmetric to be diagonalizable.
Diagonalizable means that A has n real eigenvalues (where A is an nxn
matrix). This happens if and only if A has n linearly independent
eigenvectors. This ensures that P is invertible and thus equation (1)
makes sense.

If A is symmetric then A has real eigenvalues, but the converse is not
true. Here is an example of obtaining the real eigenvalues of a
non-symmetric square matrix in Stata 8:


. matrix define A=[2,1,0\3,2,0\0,0,4]

. matrix list A

A[3,3]
    c1  c2  c3
r1   2   1   0
r2   3   2   0
r3   0   0   4

. matrix eigenvalues r c = A

. matrix list r

r[1,3]
             c1         c2         c3
real  3.7320508  .26794919          4

. matrix list c

c[1,3]
         c1  c2  c3
complex   0   0   0

. matrix define D=diag(r)

. matrix list D

symmetric D[3,3]
           c1         c2         c3
c1  3.7320508
c2          0  .26794919
c3          0          0          4





*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index