Diagonalizability with matrices? 
Let $A$ be a $n\times n$ matrix. Assume that $A$ has two eigenvalues $\lambda_1$ and $\lambda_2$, and assume that the eigenspace corresponding to $\lambda_1$ is $n-1$ dimensional, i.e. $A-\lambda_1I$ has an $(n-1)$-dimensional null space. Prove that $A$ is diagonalizable.

So I know that since the eigenspace that corresponds to the first eigenvalue is of dimension $n-1$. I assume that the eigenvector of the second eigenvalue will be independent from all the vectors in the first eigenspace, but how do I go about proving that?
 A: The key point is that eigenvectors related to different eigenvalues are always linearly independent. Suppose $v_2\neq 0$ is related to $\lambda_2$, i.e. $Av_2=\lambda_2v_2$. Then it is impossible that $v_2$ is in the null space of $\lambda_1$, because in this case we would have also $Av_2=\lambda_1v_2$, and then $\lambda_1v_2=\lambda_2v_2$, which is impossible if $\lambda_1\neq \lambda_2$ and $v_2\neq 0$.
A: First of all, it is implied (and essential) that $\lambda_1 \ne \lambda_2$. Now chose a set of basis vectors $\{u_i\}_{i=1}^{n-1}$ for $\mathrm{Eig}_{\lambda_1}(A)$ (it has dimension $n-1$ by assumption). If an eigenvector $v$ of $\lambda_2$ was linearly dependent of them, then it is inside $\mathrm{Eig}_{\lambda_1}(A)$ and thus $v = \sum_{i=1}^{n-1} \alpha_i u_i$ so
$$\lambda_2 v = Av = \sum_{i=1}^{n-1} \alpha_i Au_i = \sum_{i=1}^{n-1} \alpha_i \lambda_1 u_i = \lambda_1 v \Rightarrow \lambda_1 = \lambda_2\quad \huge\unicode{x21af}$$
Now to complete the assignment, nothing else is needed by dimension arguments. We've already found a diagonalisation of $A$:
Let $V = \pmatrix{u_1&\cdots&u_{n-1}&v}\in\mathbb K^{n\times n}$. Then
$$A = V \pmatrix{\lambda_1 & & & \\ & \ddots & & \\ & & \lambda_1 &\\ & & & \lambda_2} V^{-1}$$
