How is the following a ring? I am copying it directly from Dummit and Foote.

A function $f:\mathbb{R}\rightarrow\mathbb{R}$ is said to have compact support if there are real numbers $a,b$ (depending on $f$) such that $f(x)=0$ for all $x\notin[a,b]$ (i.e., $f$ is zero outside some closed bounded interval). The set of all functions $f:\mathbb{R}\rightarrow\mathbb{R}$ with compact support is a commutative ring without identity.

I didn't understand how is it a ring. I mean if say $f$ has support $[1,2]$ and $g$ has support $[3,4]$, then $f+g$ will have support $[1,2]\cup[3,4]$ which is not of the form $[a,b]$. 
Also, I didn't understand why wouldn't the given ring have an identity?
 A: Your function $f+g$ has compact support because, for example, it is $0$ outside the interval $[-100,42]$. So there is a closed interval $[a,b]$ such that $f(x)+g(x)=0$ outside the interval $[a,b]$.
As for the lack of a multiplicative identity, it is not hard to show that such an identity must be the function that is identically $1$. This function does not have compact support.
A: I just post my response for the sake of completeness.
Suppose that $f$ and $g$ have compact support on $[a,b]$ and $[c,d]$ respectively.
\begin{align*}
  f(x) &= 0 \quad \forall x \in \mathbb{R} \setminus [a,b] \\
  g(x) &= 0 \quad \forall x \in \mathbb{R} \setminus [c,d] \\
  (f+g)(x) &= 0 \quad \forall x \in \mathbb{R} \setminus ([a,b] \cup [c,d])
\end{align*}
Then $f+g$ has compact support on $[\min\{a,b\},\max\left\{ c,d \right\}]$.  I think commutativity is trivial.
Suppose we have an idenetiy element $g$ in the ring of functions with compact support.  Since $fg:\mathbb{R}\to\mathbb{R}$ is defined by $(fg)(x) = f(x) g(x) \forall x \in \mathbb{R}$, the identity element should satisfy $(fg) = f$ forall $f$ in the given ring.  We suppose that $f \ne 0$.  i.e. $\exists x_0 \in \mathbb{R}$ such that $f(x_0) \ne 0$.
\begin{align*}
  f(x) g(x) &= f(x) &\quad \forall x \in \mathbb{R} \\
  f(x) (g(x) - 1) &= 0 &\quad \forall x \in \mathbb{R} \\
  g(x) &= 1 &\quad \mbox{ if } f(x) \ne 0
\end{align*}
For all $x \in \mathbb{R}$, we can construct $f_x:\mathbb{R}\to\mathbb{R}$ by
\begin{equation*}
  f_x(t) =
  \begin{cases}
    x & \mbox{if } x = t \\
    0 & \mbox{if } x \ne t. \\
  \end{cases}
\end{equation*}
This forces $g(x) = 1 \forall x \in \mathbb{R}$, so $g$ is not in the given ring.  Contradiction.  Hence the ring has no identity element.
