Necessary and Sufficient Conditions for Riemann Integrability A function is called Riemann integrable if and only if it is bounded and continuous almost everywhere on its domain.  However, I have read that the following two statements are also true:
a) If $f$ is continuous then $f$ is Riemann integrable
b) If $f$ is bounded then $f$ is Riemann integrable
How exactly do these conditions fit together to give the necessary and sufficient condition first stated here?
 A: Assertion $(a)$ is true (and continuity over a closed interval implies boundedness), but assertion $(b)$ is not! Take $${\bf 1}_{[0,1]\cap \Bbb Q}$$
It isn't Riemann integrable over $[0,1]$, yet it is bounded.
ADD The conditions for Riemann integrability are very precise. A (bounded) function is Riemann integrable over a closed interval $[a,b]$ if the following equivalent conditions hold:
$(1)$ For each $\epsilon>0$ there exist step functions $s_1\leq f \leq s_2$ such that $$\int_a^b s_2-\int_a^b s_1<\epsilon$$ 
$(2)$ There exists a number $I$ (the integral) such that for each $\epsilon >0$ there exists a $\delta >0$ such that for each tagged partition $P=\{x_0,\dots,x_n,t_0,\dots,t_n\}$ of $[a,b]$ with $\Delta P<\delta $ (the mesh of $P$) we have $$\left| I-\sum_{x,t\in P}f(t)\Delta x\right| <\epsilon$$
$(3)$ For each $\epsilon >0$ there exists a partition $P_\epsilon=\{x_0,\dots,x_n\}$ of $[a,b]$ such that $$U(f,P_\epsilon)-L(f,P_\epsilon)<\epsilon$$
$(4)$ It holds that $$\sup\{L(f,P):P \text{ is a partition of } [a,b]\}=\inf\{U(f,P):P \text{ is a partition of } [a,b]\}$$
$(5)$ The set of discontinuities of $f$ has Lebesgue measure $0$, that is, given $\epsilon >0$, the set $$A=\{x\in[a,b]:f\text{ is discontinuous at } x\}$$ can be covered my countably many open intervals such that the sum of their lengths is less than $\epsilon$. 
A: Note that, the statement in $(b)$ is not true in general. To see this, just consider the Dirichlet function which is not Riemann integrable. 
A: Riemann integrability depends on $f$ being defined on a closed interval; so I'll assume that the domain is as given. 
For question a, you want to consider the proposition that a continuous function on a compact set (like say a closed interval) is bounded. If you can show that, then it follows that the function is bounded and continuous AE on the domain. 
For question b, I believe the statement is false, consider the characteristic function on the rationals over $[0,1]$. The upper sums are always 1 and the lower sums are always 0 no matter how you partition the domain. 
A: Necessary Condition
Let $f$ be Riemann integrable.
Let $\epsilon \in \mathbb{R}_{>0}$ be given.
It is to be proved that a subdivision $S$ of $\left[{a \,.\,.\, b}\right]$ exists such that:
$U \left({S}\right) – L \left({S}\right) < \epsilon$
As $f$ is Riemann integrable:
$\displaystyle \int_a^b f \left({x}\right) \ \mathrm d x$ exists.
By the definition of the Riemann integral:
the lower integral $\displaystyle \underline {\int_a^b} f \left({x}\right) \ \mathrm d x$ exists.
Thus by the definition of lower integral:
$\sup_P L \left({P}\right)$ exists
where:
$L \left({P}\right)$ denotes the lower sum of $f$ on $\left[{a \,.\,.\, b}\right]$ with respect to the subdivision $P$
$\sup_P L \left({P}\right)$ denotes the supremum for $L \left({P}\right)$.
It follows that a subdivision $S_1$ of $\left[{a \,.\,.\, b}\right]$ exists, satisfying:
$\sup_P L \left({P}\right) - L \left({S_1}\right) < \dfrac \epsilon 2$
In a similar way:
By the definition of the Riemann integral:
the upper integral $\displaystyle \overline {\int_a^b} f \left({x}\right) \ \mathrm d x$ exists.
Thus by the definition of upper integral:
$\inf_P U \left({P}\right)$ exists
where:
$U \left({P}\right)$ denotes the upper sum of $f$ on $\left[{a \,.\,.\, b}\right]$ with respect to the subdivision $P$
$\inf_P U \left({P}\right)$ denotes the infimum for $U \left({P}\right)$.
It follows that a subdivision $S_2$ of $\left[{a \,.\,.\, b}\right]$ exists, satisfying:
$U \left({S_2}\right) - \inf_P U \left({P}\right) < \dfrac \epsilon 2$
Now let $S := S_1 \cup S_2$ be defined.
We observe:
$S$ is either equal to $S_1$ or finer than $S_1$
$S$ is either equal to $S_2$ or finer than $S_2$
We find:
$L \left({S}\right) \ge L \left({S_1}\right)$ by the definition of lower sum and $S$ refining $S_1$
$U \left({S}\right) \le U \left({S_2}\right)$ by the definition of upper sum and $S$ refining $S_2$
Recall that by definition of Riemann integrable:
$\displaystyle \overline {\int_a^b} f \left({x}\right) \ \mathrm d x = \underline {\int_a^b} f \left({x}\right) \ \mathrm d x$
