TITLE: Maximal ideal in the ring of continuous functions from $\mathbb{R} \to \mathbb{R}$
QUESTION [8 upvotes]: Well, the problem I'm trying to solve is this: 

Let $A$ be the ring of all continuous functions from $\mathbb{R} \to \mathbb{R}$. Show that $M = \{f \in A: f(0)=0\}$ is a maximal ideal of $A$.

I tried to show that if $J$ is an ideal of A that properly contains M, so $J = A$: we know that there is a function $g \in J$ with $g(0) \neq 0$. So, we have that
$$J \supseteq \langle g, M\rangle=\{ag+f;a \in A, f\in M\}$$ 
I tried to show that 1 $\in$ $\langle g,M\rangle$. However I'd have to find some function $h(x)\in A$ such that $h(x)(ag+f) = 1$, but this function $h$ has to be different from 0 for all x $\in \mathbb{R}$, so I don't know how to find this function.
My second idea to solve this problem was prove that the quocient $A/M$ is a field.
We have that
$$A/M = \{h(x) + M; h(x) \in A\},$$ but again I have the problem to show that all elements of $A/M$ are units.
If someone could help, I would be really grateful (:

REPLY [5 votes]: If $J \subset A$ contains $M$ properly, then there must be some function $f \in J - M$, i.e., for which $f(0) = a \not= 0$.
Consider $f - a \in M \subset J$: we know $f-a$ is continuous, and evaluated at $0$ it returns $a-a = 0$.
Next, consider that $J$ is closed (as it is an ideal) under addition. Since $f \in J$ and $f-a \in J$, we find that the constant nonzero function $a = f - (f-a) \in J$. Since $a \neq 0$, we also have the continuous (constant) function $1/a \in A$, which means that $J$ contains $a(1/a) = 1$, since ideals are closed under multiplication with any element of the parent ring. But this means that $1 \in J$, so that $J = A$, whence $M$ is maximal as desired.