Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am running a matlab code for computing the Drazin inverse of the matrix $A$.

Initial value of the iteration method is $X_0 = \beta A^{k}$, where $k = index (A)$(For $A\in \mathbb{C}^{n\times n}$, the smallest nonnegative integer $k$ such that $rank(A^{k+1}) = rank(A^k)$ is called the index of $A$). .

Parameter $\beta$ satisfies: $0<\beta < \frac{2}{\lambda_{max}(A^{k+1})}$.

I want to test the method for the randomly generated matrices so I need a matlab code to determine the maximum eigen value of the matrix $A^k$ so that I may easily choose the value of $\beta$.

Could anybody help me with this. Thanks

share|cite|improve this question
You may use $\mathtt{eig}(\cdot)$ and then call $\mathtt{max}(\cdot)$? – Lord Soth Apr 24 '13 at 18:54
Depending on your size of matrix, using eigs to find only the largest eigenvalue with power-method may be faster. – Memming Apr 24 '13 at 18:57
@Memming I am using $1000 \times 1000$ matrix. – srijan Apr 24 '13 at 18:59
up vote 2 down vote accepted

Are you looking for the largest eigenvalue or the eigenvalue with the largest magnitude? For magnitude,


is much slower especially if you want to repeat it multiple times because it will compute all of the eigenvalues and then pick the max. You might want to use


which will compute and return only the largest magnitude eigenvalue.

share|cite|improve this answer
Thank you very much. It helped me. :) – srijan Apr 24 '13 at 21:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.