What is the smallest and second smallest eigenvalue of $P(u)$? Let $P(u)$ be the linear function mapping vector $x\in \Bbb R^n$ to the difference between $x$ and the projection of $x$ on the line $L(0,u)$ (the line through zero with direction $u$.)

What is the smallest and second smallest eigenvalue of $P(u)$?

I think it should be $0$ and $1$, i'm not sure though.
 A: $0$ and $1$ are the only eigenvalues.
Given an arbitrary $u$, we have $P(u)$ evaluated at $x$ equals $x - \frac{u^T x}{\| u^2 \|}u$.
Now consider the eigenvalue equation $v - \frac{u^T v}{\| u^2 \|}u = \lambda v$, which is equivalent to $\frac{u^T v}{\| u^2 \|} u = (1 - \lambda)v$. Observe that one side is parallel to $u$ while the other is parallel to $v$. We proceed in two steps. 
First, consider $v = \alpha u$. In this case, the equation holds only when $u = (1 - \lambda)u$ and therefore each $v$ parallel to $u$ is an eigenvector with eigenvalue $0$. Second, if $v$ is not parallel to $u$, the equation only holds when one side is zero. The right hand side is zero if and only if $\lambda = 1$ and the left hand side is zero if and only if $v$ and $u$ are orthogonal. Therefore, each $v$ orthogonal to $u$ is an eigenvector with eigenvalue $0$.

EDIT: A more straightforward way to do this is as follows. Knowing that the only eigenvalues of any projection matrix are $0$ and $1$, you can write $P(u)$ in matrix form as $P(u) = I - Q$, where $Q$ is the appropriate projection matrix. Then the eigenvalue equation of $P$ has the form $Qv = (1 - \lambda)v$, from which $\lambda$ can only be $0$ and $1$.
