Given endomorphisms, show that every one-dimensional subspace is invariant over these endomorphisms I'm having trouble with this problem and I was wondering if somebody could assist in solving it.
So, we have that $W$ is a finite dimensional vector space over some field. We let a linear map $P$ be an endomorphism over the vector space $W$. 
Now, the first part of this question says:
Presume that $PQ = QP$ for every endomorphism $Q$ over the vector space $W$. Prove that every one-dimensional subspace of $W$ is $P-invariant$.
For the second part of this question, we assume that we have such $P$ from the first part of the question ($PQ = QP$) and show that $P = \lambda I$ for some $\lambda$ in the given field. 
EDIT: Sorry, $I$ is the identity map.
I'm not sure about how to solve either of these problems unfortunately.
Thanks! Helen
 A: For the first part, pick an arbitrary $v \in W$ with $v \neq 0$. Construct a basis $v, u_1, u_2, \dots, u_m$. Let $Q_v : W \to W$ be the map such that $Q_vv = v$ and $Q_vu_i = 0$. From the assumption we have that $PQ_v = Q_vP$ which implies $Q_vPv = PQ_vv = Pv$, which shows that the vector $Pv$ is an eigenvector of $Q_v$ with eigenvalue 1, which implies that $Pv$ is a multiple of $v$, since $Q_v$ only has one one-dimensional eigenspace with eigenvalue 1.
This is assuming $Pv \neq 0$. If $Pv = 0$, we must have that $P = 0$, the map sending every vector to zero.
Thus the one-dimensional subspace spanned by $v$ is $P$-invariant. Since $v$ was picked arbitrarily, this shows that every one-dimensional subspace of $W$ is $P$-invariant.
For the second part, we consider again that $Pv = \lambda_v v$ for some scalar $\lambda_v$ and every vector $v \neq 0$ (i.e. that every one-dimensional subspace is $P$-invariant).
We apply this to the first vector of the standard basis $e_1$, so we get $Pe_1 = \lambda_{e_1} e_1$.
We apply this to a sum $e_1 + e_i$, for an arbitrary standard basis vector $e_i$ and get:
$$P(e_1 + e_i) = \lambda_{e_1 + e_i}(e_1 + e_i) = \lambda_{e_1+e_i}e_1 + \lambda_{e_1 + e_i}e_i$$
but we also have
$$P(e_1 + e_i) = Pe_1 + Pe_i = \lambda_{e_1} e_1 + \lambda_{e_i}v_i$$
so we must have $\lambda_{e_i} = \lambda_{e_1 + e_i} = \lambda_{e_1}$.
Thus we have, for every standard basis vector $e_i$ that $Pe_i = \lambda_{e_1}e_i$, so $P = \lambda_{e_1} I$.
