linear algebra help - diagonal matrix and triangular matrix (a) Suppose that the eigenvectors of an n×n matrix A are the standard basis vectors ej for j = 1, . . . , n. What kind of matrix is A? 
(b) Suppose that the matrix P whose columns are the eigenvectors of A is a triangular matrix. Does that mean that A must be triangular? Why or why not?
Im stuck on part b. I figure A must be a diagonal matrix, but doesn't that make P also a diagonal matrix? Any hints/helps? thanks in advance.
 A: If you have 
$$A\cdot \begin{pmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}=\alpha_1 \begin{pmatrix} 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix},$$ what can you infer about the first column of $A?$ Once you have the answer, consider
$$A\cdot \begin{pmatrix}a\\ 1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}=\alpha_2 \begin{pmatrix} a\\1 \\ 0 \\ \vdots \\ 0 \end{pmatrix}.$$ What can you say about the second column of $A?$ Repeat the process until the column $n-1.$ 
A: I suppose that the basis vectors $\mathbf{e}_i$ are proper eignevectors of $A$, and $A$ is diagonalizable. In this case you have:$A=PDP^{-1}$ where $D$ is a diagonal matrix with  the eigenvalues of $A$ as diagonal elements and $P$ is a matrix that has as columns the eigenvectors, so, in your case $P=I$ and A is diagonal.
For the question b) note that upper triangular matrices form a subring of $n\times n$ matrices. So the inverse of an upper triangular matrix is upper triangular and the product of upper triangular matrices is upper triangular. Since a diagonal matrix is also upper triangular, the product $PDP^{-1}=A$ is upper triangular.
If $A$ is not diagonalizable then someone of the eigenvectors is a generalized eigenvector and the decomposition is a Jordan canonical form $A=PJP^{-1}$ where $J$ is upper triangular In this case $A$ is upper triangular if $P$ is upper triangular.
