Let $R$ be the ring of real-valued continuous functions on $[0,1]$. If $M$ is a maximal ideal of $R$ prove $\exists \lambda \in [0,1]$ s.t. $M = \{f(x) \in R : f(\lambda) = 0 \}$. (from Herstein Topics in Algebra)
My attempt: For contradiction assume $M$ is a maximal ideal of $R$ but $\exists m, m' \in M$ s.t. $m$ and $m'$ vanish at different points if at all. We'll prove that this implies $M = R$, a contradiction, so all $m, m' \in M$ must vanish at the same point.
Because $m, m' \in M$, $m^2, m'^2 \in M$ as well. $m^2$ and $m'^2$ are two non-negative continuous functions in $M$ s.t. $m'^2 (\lambda) = 0 \rightarrow m^2 (\lambda) \neq 0$ and vice versa. Because $M$ is an ideal, $m^2 + m'^2 \in M$ as well. $m^2 + m'^2$ is strictly positive and, like every element of $R$, bounded. Therefore the continuous function $f = \frac{1}{m^2 + m'^2}$ exists in $R$. So $f \cdot (m^2 + m'^2) \in M$, so $1 \in M$, so $M = R$.
Please let me know if this proof works and thank you in advance.