A proof in Howard Georgi's "Lie Algebras in Particle Physics" I am reading the book referenced above and in the first chapter, in the proof of theorem 1.3 (fifth line of the proof), it says:

But because D2 is irreducible, P must project onto the whole space [...]

I don't see why the fact that D2 is irreducible implies that.
I know that probably this is a very stupid question, but I am new to group theory and I feel that I am missing some key point.
 A: $P$ is defined as the projector onto a particular nonzero subspace $W$ of the vector space $V$ on which the representation acts.  It is shown in the proof (see eq. 1.40) that $W$ is an invariant subspace of the representation $D_2$.  Since, by definition, an irreducible representation has no invariant subspaces except for $V$ and $\{0\}$, we find immediately that $W=V$.
A: The properties of $P$ aren't specified in your question but it's implicitly clear that $P$ is assumed or proved at that place to commute with all elements of the group (or Lie algebra),
$$ \forall g\in G, \quad Pg = gP $$
If the image of $P$ were not the full space $D_2$ but its proper subspace $V\subset D_2$ (different from $\{0\}$, however), then $V$ would be a representation of the group (or Lie algebra) by itself, thus proving that $D_2$ isn't irreducible. That's a proof by contradiction.
Why would $V$ be a representation of $G$? Because
$$\forall v\in V,g\in G:\quad g v = gPv = Pgv \in V $$
because $Pv=v$ and $Pg=gP$. If we prove that any $gv$ for $v\in V$ is an element of $V$ – because it's of the form $P$ acting on something and $P$ on anything is in $V$ – we have proven that $V$ is closed under the action of any element $g\in G$, and is therefore a representation of $G$.
A: Let's assume there is a non zero vector $|\mu\rangle \in V $ such that $A|\mu\rangle=0$, meaning $|\mu\rangle$ belongs to the $\ker(A)$ i.e.
$$A|\mu\rangle=0 \implies |\mu\rangle \in \ker(A)$$
Now, let us imagine that there exists a projection operator onto this subspace i.e. $P : V \rightarrow \ker(A)$. By definition if $|\mu\rangle \in \ker(A)$, then $P|\mu\rangle \in \ker(A)$. $$A|\mu\rangle=0\implies AP|\mu\rangle=0$$
Now, Let's consider the case $D_{1}(g)AP|\mu\rangle$
\begin{align}
D_{1}(g)AP|\mu\rangle &=D_{1}(g)(0) = 0\\
AD_{2}(g)P|\mu\rangle &=0 \implies D_{2}(g)P|\mu\rangle \in \ker(A)
\end{align}
This means if $P|\mu\rangle\in\ker(A)$ then so does $D_{2}(g)P|\mu\rangle\in\ker(A)$ implies that $\ker(A)$ is this invariant subspace under the representation $D_{2}(g)$ since an invariant subspace is any $W \subset V$ such that for all $|x\rangle \in W$ we have $D(g)|x\rangle\in W$ for some representation $D(g)$. However, it is still not clear if the invariant subspace is a proper invariant subspace or not. In order to clarify that we need to look at the fact that $D_{2}(g)$ is irreducible. A representation is called irreducible if it contains no proper invariant subspace. It means $\ker(A)$ can't be a proper invariant subspace and the only way for that to happen is if $\ker(A)=V$. Thus, the projection operator is a map $P:V\rightarrow V$. It projects onto the whole space and the whole space is $ker(A)$.
