[proofplan]
A factor is, by definition, a von Neumann algebra whose center consists only of scalar multiples of the identity. One implication is immediate: a scalar projection $\lambda 1$ satisfies $\lambda^2=\lambda$, hence $\lambda\in\{0,1\}$. Conversely, if there are no nontrivial central projections, we apply the spectral theorem to a self-adjoint central element. Its spectral projections are again central, so the hypothesis forces the spectrum to be a singleton; therefore every self-adjoint central element is scalar, and then the real and imaginary parts of an arbitrary central element are scalar.
[/proofplan]
[step:Show that scalar central projections are only $0$ and $1$]
Assume first that $M$ is a factor. By the definition of factor, $Z(M)=\mathbb C1$.
Let $p\in Z(M)$ be a projection. Since $Z(M)=\mathbb C1$, there exists $\lambda\in\mathbb C$ such that $p=\lambda 1$. The projection identities $p^*=p$ and $p^2=p$ give
\begin{align*}
\overline{\lambda}1=\lambda 1
\end{align*}
and
\begin{align*}
\lambda^2 1=\lambda 1.
\end{align*}
Since $1\ne 0$, we have $\lambda\in\mathbb R$ and $\lambda^2=\lambda$. Hence $\lambda(\lambda-1)=0$, so $\lambda=0$ or $\lambda=1$. Therefore $p=0$ or $p=1$.
[/step]
[step:Show that spectral projections of a self-adjoint central element are central]
Assume conversely that the only projections in $Z(M)$ are $0$ and $1$.
Let $a\in Z(M)$ be self-adjoint, and let $\sigma(a)\subseteq\mathbb R$ denote its spectrum. Let
\begin{align*}
E_a:\mathcal B(\mathbb R)\to \mathcal P(M)
\end{align*}
denote the spectral measure of $a$, so that $E_a(B)$ is the spectral projection of $a$ associated to the Borel set $B\subseteq\mathbb R$.
We use the spectral theorem for self-adjoint elements of a von Neumann algebra: since $a\in M$ is self-adjoint, $E_a(B)\in M$ for every Borel set $B\subseteq\mathbb R$. Moreover, [Borel functional calculus](/theorems/2696) preserves commutation: if $x\in M$ and $xa=ax$, then $xE_a(B)=E_a(B)x$. Since $a\in Z(M)$, every $x\in M$ commutes with $a$, and therefore every $x\in M$ commutes with $E_a(B)$. Thus
\begin{align*}
E_a(B)\in Z(M)
\end{align*}
for every Borel set $B\subseteq\mathbb R$.
By the hypothesis on central projections, each $E_a(B)$ is equal to either $0$ or $1$.
[guided]
The point of this step is to turn information about central projections into information about the spectrum of a central self-adjoint operator.
Let $a\in Z(M)$ be self-adjoint, and let
\begin{align*}
E_a:\mathcal B(\mathbb R)\to \mathcal P(M)
\end{align*}
be the spectral measure of $a$. For each Borel set $B\subseteq\mathbb R$, the spectral theorem for self-adjoint elements of a von Neumann algebra gives
\begin{align*}
E_a(B)\in M.
\end{align*}
We must also check centrality. Since $a\in Z(M)$, every $x\in M$ satisfies $xa=ax$. Borel functional calculus preserves commutation, so applying the Borel function $\mathbb 1_B:\mathbb R\to\{0,1\}$ to $a$ gives
\begin{align*}
xE_a(B)=E_a(B)x.
\end{align*}
This holds for every $x\in M$, hence $E_a(B)\in Z(M)$.
Each $E_a(B)$ is a projection by the defining properties of spectral measures. The standing hypothesis says that the only projections in $Z(M)$ are $0$ and $1$. Therefore every spectral projection $E_a(B)$ is forced to be one of these two projections. This is the mechanism that will prevent the spectrum of $a$ from splitting into two nonempty pieces.
[/guided]
[/step]
[step:Use the absence of nontrivial spectral projections to force a self-adjoint central element to be scalar]
We claim that $\sigma(a)$ consists of a single point. Suppose not. Since $a$ is self-adjoint, $\sigma(a)\subseteq\mathbb R$. Choose $\alpha,\beta\in\sigma(a)$ with $\alpha<\beta$, and choose $t\in\mathbb R$ such that $\alpha<t<\beta$.
Define the Borel sets
\begin{align*}
B_-:=(-\infty,t]
\end{align*}
and
\begin{align*}
B_+:=(t,\infty).
\end{align*}
Both $B_-$ and $B_+$ meet $\sigma(a)$. By the support property of the spectral measure, every [open set](/page/Open%20Set) meeting $\sigma(a)$ has nonzero spectral projection, and equivalently the spectral projection of a Borel set containing a nonempty relatively open part of $\sigma(a)$ is nonzero. Hence
\begin{align*}
E_a(B_-)\ne 0
\end{align*}
and
\begin{align*}
E_a(B_+)\ne 0.
\end{align*}
Since $B_-\cap B_+=\varnothing$ and $B_-\cup B_+=\mathbb R$, countable additivity of the projection-valued measure gives
\begin{align*}
E_a(B_-)+E_a(B_+)=E_a(\mathbb R)=1.
\end{align*}
Thus $E_a(B_-)$ is neither $0$ nor $1$, contradicting the previous step. Therefore $\sigma(a)=\{\lambda\}$ for some $\lambda\in\mathbb R$.
By the continuous functional calculus for [self-adjoint operators](/page/Self-Adjoint%20Operators),
\begin{align*}
\|a-\lambda 1\|_{\mathrm{op}}=\sup_{s\in\sigma(a)} |s-\lambda|=0.
\end{align*}
Hence $a=\lambda 1$.
[/step]
[step:Apply the self-adjoint case to the real and imaginary parts of a central element]
Let $z\in Z(M)$ be arbitrary. Define its real and imaginary parts by
\begin{align*}
b:=\frac{z+z^*}{2}
\end{align*}
and
\begin{align*}
c:=\frac{z-z^*}{2i}.
\end{align*}
Then $b,c\in M$ are self-adjoint. Since $z\in Z(M)$, also $z^*\in Z(M)$, and therefore $b,c\in Z(M)$.
By the previous step, there exist $\lambda,\mu\in\mathbb R$ such that
\begin{align*}
b=\lambda 1
\end{align*}
and
\begin{align*}
c=\mu 1.
\end{align*}
Thus
\begin{align*}
z=b+ic=(\lambda+i\mu)1.
\end{align*}
So $Z(M)\subseteq\mathbb C1$. The reverse inclusion $\mathbb C1\subseteq Z(M)$ holds because scalar multiples of the identity commute with every element of $M$. Therefore
\begin{align*}
Z(M)=\mathbb C1.
\end{align*}
By the definition of a factor, $M$ is a factor. This proves the converse implication and completes the proof.
[/step]