[Gretl-users] Check for idempotent matrix in gretl

Allin Cottrell cottrell at wfu.edu
Fri Apr 13 20:50:51 EDT 2007


On Sat, 14 Apr 2007, Riccardo (Jack) Lucchetti wrote:

> > The eigenvalues of idempotent matrices (in the symmetric case) 
> > can only be 0 or 1. The thing is, I'm not sure if the converse 
> > holds: if a matrix is symmetric and its eigenvalues are all 0 
> > or 1, does that mean that it's idempotent? My gut feeling is 
> > that the answer is yes, but I need to think about it, it's not 
> > obvious.
> 
> Thinking a bit more about it, I thought it would be way more 
> economical, from a computational viewpoint, to decide whether a 
> matrix is idempotent or not simply by a multiplication check, 
> because matrix multiplication is much cheaper than the 
> eigenproblem. But, may I ask what this check is for?

The "what it is for question": Andreas K suggested that it would 
be useful to report whether or not a matrix is idempotent, along 
with the other information presented when you access the 
"Properties" of a saved matrix in the gretl GUI.

For sure, we could actually carry out the multiplication and check 
whether or not A*A = A.  But since we're calculating eigenvalues 
anyway, and since calculating A*A directly would require an extra 
memory allocation, it struck me that if we could answer this 
question using the eigenvalues that would be preferable.

Like you, I'm familiar with the idea that if the symmetric matrix 
A is idempotent, then the eigenvalues of A are all either 0 or 1.  
But I also wondered if this is or is not a bi-implication; and in 
particular I wondered what can be said in the asymmetric case 
(where, in general, the eigenvalues could be complex).

Andreas -- since you raised this! -- can you help us?

Allin.



More information about the Gretl-users mailing list