Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

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

Can anyone tell me a $3\times3$ matrix that has eigenvalues $1,2,3$ ( or any matrix with integer eigenvalues)?

I need to show the classroom how to calculate eigenvectors using Gauss-Jordan method. So diagonal elements just won't do it.

Please help me.

share|cite|improve this question
Conjugate your nice diagonal matrix by any invertible matrix, preferably one from $GL(n,\Bbb Z)$. Or you could successively conjugate by small transvections until you find the result looks sufficiently scambled. – Marc van Leeuwen Mar 12 '14 at 12:14
up vote 3 down vote accepted

Here it is$$\begin{pmatrix}5&2&-2\\2&5&-2\\-2&-2&5 \end{pmatrix}$$ and $$\begin{pmatrix}1&0&0\\0&2&-2\\1&0&3 \end{pmatrix}$$

share|cite|improve this answer
@shashank here it is with 3,3,9 eigenvalues – Sameh Shenawy Mar 12 '14 at 8:51
Thanks. Can you tell me another with unique eigenvalues too. – Shashank Mar 12 '14 at 8:52
@Shashank here it is with 1 – Sameh Shenawy Mar 12 '14 at 8:57
non-unique. and also where are you finding them? – Shashank Mar 12 '14 at 9:00
i google it@Shashank – Sameh Shenawy Mar 12 '14 at 9:01

For any $d_1, d_2, d_3$, the diagonal matrix $$ D = \begin{bmatrix} d_1 & 0 & 0 \\ 0 & d_2 & 0 \\ 0 & 0 & d_3 \end{bmatrix} $$ has eigenvalues $d_1, d_2, d_3$. If you take any invertible matrix $P$, then $$ A = P D P^{-1} $$ has the same eigenvalues as $D$, and the columns of $P$ are the corresponding eigenvectors.

share|cite|improve this answer

$$ \begin{pmatrix} 1&0&0\\ 0&2&0\\ 0&0&3 \end{pmatrix} $$ This is a matrix with eigenvalues as required.

share|cite|improve this answer
Hint: you can use \begin{pmatrix}\end{pmatrix} environment to typeset matrices. – TZakrevskiy Mar 12 '14 at 8:30
@Shashank You can construct a square matrix with any eigenvalues you like by placing them along the diagonal, then "dress it up" by performing row operations to fill in non-diagonal elements. (In many applications, we often want to go the other way, reducing a square matrix to its "diagonalized" form in order to read off the eigenvalues. Such a matrix has many convenient uses.) – RecklessReckoner Mar 12 '14 at 8:32
Well...i know that.I think I should have been clearer on the question. I need to show the classroom how to calculate eigen vectors using Gauss-Jordan method. So diagonal elements just won't do it. – Shashank Mar 12 '14 at 8:33

General recipe: start by choosing desired eigenvalues $\lambda_i$ and desired eigenvectors $v_i$ orthogonal to one another. Then form matrices

$$D=\begin{pmatrix} \lambda_1 & 0 & 0 \\ 0 & \lambda_2 & 0 \\ 0 & 0 & \lambda_3 \end{pmatrix} \qquad V=\begin{pmatrix} \vert & \vert & \vert \\ v_1 & v_2 & v_3 \\ \vert & \vert & \vert \end{pmatrix}$$

Using these, you can compute $M=V\cdot D\cdot V^{-1}$ which will have the desired eigenvectors and eigenvalues.

If you want $M$ itself to be integral as well, use the adjugate matrix instead of the inverse: $ M = V\cdot D\cdot \operatorname{adj}(V) $. The resulting matrix will have integral eigenvalues, but not neccessarily the ones you specified but a common multiple thereof. The common factor is $\det(V)$.

I tend to tune my eigenvectors by playing around until I have $\det(V)=\pm 1$. At that point, $V^{-1}=\pm V^T$ will be integral as well, and I can rely on the given eigenvalues. But this playing around may take some time, so if any integral eigenvalues will do, using the adjugate will likely be faster.

share|cite|improve this answer

(this is for $3 \times 3$ matrix example, but this method easily generalizes) Pick any set of $3$ orthonormal vectors $u,v,w$ so $u^Tu=v^Tv=w^Tw=1$ whereas $u^Tv=0$, $u^Tw=0$, $v^Tw=0$. Pick your favorite eigenvalues $a,b,c$ and write $$ A = auu^T+bvv^T+cww^T. $$ If your orthonormal basis has normalization by $\sqrt{3}$ then just pick an e-value which has $3$ as a factor and the pesky fractions vanish and you can easily verify $u,v,w$ are e-vectors with e-values $a,b,c$ respective. To make this method quick you probably want to pick a favorite orthonormal basis and calculate the rank one $uu^T$, $vv^T$ and $ww^T$ matrices carefully for repeated use. I should have done this years ago. Basically, we're just reverse-engineering the spectral theorem.

share|cite|improve this answer

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.