Meaning of measure zero My book describes measure zero as following:

A set of points on the $x$-axis is said to have measure zero if the sum of the lengths of intervals enclosing all the points can be made arbitrarily small. If $f(x)$ is bounded in $[a,b]$, then a necessary and sufficient condition for the existence of $\int_a ^b f(x)dx$ is that the set of discontinuities have measure zero.

I don't really understand what is said here. How can the sum of the lengths of the intervals be made arbitrarily small? Wouldn't you have to move the points together? The only way I would see a set of points not obeying this is if it contains an infinite amount of points. Can someone clarify the meaning of 'measure zero' and its relation to the integral?
 A: Your definition, as stated, is not quite complete. The problem has to do with how we might evaluate the sum of the lengths of uncountably many intervals.
More specifically: given any set $S \subset \mathbb R$,we can express it as the union of the intervals $\{[x,x] : x \in S\}$, each of which has length 0. So if we allow that the sum of the lengths of uncountably many zeroes is zero, then we get that all subsets of $\mathbb R$ have measure zero. Which is not what we want!
So you have to be more careful: a set $S \subset \mathbb R$ has measure zero if the sum of the lengths of a countable collection of intervals enclosing the points can be made arbitrarily small. This makes sense, because the sum of a countable set of non-negative real numbers is either $\infty$ or some well-defined real number.
When I say that the sum of a collection of intervals can be made arbitrarily small, I mean that if you give me any $\epsilon > 0$, then I can show you a countable collection of intervals enclosing each point of $S$, whose total length is $\le \epsilon$.
Using the argument in the second paragraph, this gives us immediately that any countable subset of $\mathbb R$ has measure zero. But there are also uncountable subsets of $\mathbb R$ with measure zero. The canonical example is the Cantor set.
This is a fascinating subject! If you don't know what a countable set is, you're lucky: just look up "Countable set" in Wikipedia, and you will find a whole new world opening up before you.
A: Okay, a bunch of things. First something (call it $x$) being arbitrarily small means that you give me any (positive) $\epsilon$, no matter how small, $x$ will be less than your $\epsilon$.
Second, the paragraph says that the SUM of the length of the intervals containing the points can be made arbitrarily small. It doesn't have to be a SINGLE interval. If we were working with only a SINGLE interval then yes, the points would have to be moved together to make the interval arbitrarily small. But here we do allow several intervals if necessary so we can make each one of them arbitrary small meaning their sum can be made arbitrarily small.
Here is an easy example. Every finite set has measure zero. Consider the set $\{0,1\}$ for example. This set has measure zero because no matter how small of an $\epsilon$ you give me, I can find you two small (non-overlapping) intervals, one containing zero and the other containing one, where the sum of the length of two intervals will be less than $\epsilon$. If you give me $\epsilon=0.0001$ then I will tell you
$$[-0.00001,0.00001] \textrm{ and }[0.99999,1.00001].$$
Both of these intervals have length 0.00002 so their SUM is 0.00004 which is less than you $\epsilon=0.0001$. This is easy to see for finite number of points but it turns out that even for some infinite sets, this is also possible. For example, if we consider all of the unit fractions $\{1,1/2,1/3,1/4,1/5,...\}$ between zero and one, then this set also has measure zero. I can give a list of small enough intervals around each fraction such that the sum of all their lengths will be less than your $\epsilon$. In this case we will have infinite number of intervals but the sum of their lengths will be finite just like how the infinite sum
$$1+\frac{1}{2}+\frac{1}{4}+\frac{1}{8}+...=2$$
can have a finite value.
Measure here means Lebesgue Measure (there are others) and measure generalizes the "length" or "size" of a set. It allows us to measure sets which we couldn't do otherwise. We still can't measure EVERY set out there on the real number line but we can measure a lot more than we could before. So a set having measure zero means that the set is somehow "really small". It isn't too big. If it is too big then its measure will be a positive number.
The relation to the Riemann integral is that if $f(x)$ doesn't have "too many" discontinuities on its domain of integration, then it is integrable. The exact criteria is that the set of discontinuities must have measure zero. This was a big question for a while actually, that exactly what are the conditions for a function to be (Riemann) integrable. The integral is just the (signed) area under the curve and clearly the function doesn't need to continuous to be integrable. One discontinuity is okay. Two are okay. Three are okay and in fact certain infinite number of discontinuities (such as on the unit fractions) are also okay. But some functions with "too many" discontinuities aren't integrable. So exactly where do you draw the line? Lebesgue came along and answered this question brilliantly and developed a whole new branch of math called Measure Theory usually not touched upon in detail until graduate mathematics.
A: Something that really clarified and made measure 0 makes sense to me was thinking about the rational numbers: $\mathbb{Q}$. The first important idea in understanding measure 0 is that you can measure an interval by its length meaning the measure of $[a,b]$ and $(a,b) = b-a$ (Assuming $b>a$). Measure can be extended to sets that aren't intervals but they are the easiest to start with. 
Now with this simple definition the measure of a point is easy since $x=[x,x]$ so measure of $x$ is $x-x=0$. Now since measure of a larger set can be thought of as the sum of intervals in the set this implies that the measure of the natural numbers, and integers are both 0 since the measure is 0 at every point. 
Now in classical analysis there are results about the size of infinities which I don't think I need to go into much depth in this answer but essentially an infinite set is countably large if you can create a set from the natural numbers that maps onto the other set, which essentially means for each element in that set you can assign a Natural number.
As a quick example the Integers are countable since you can match them up:
$1\to 0, 2\to1, 3\to-1, 4\to2$ etc.
These simple results, mappings between countable sets and the natural numbers being measure 0 can be used to prove that other sets that don't seem like they would be measure 0 are like $\mathbb{Q}$
Now the relation to the Riemann integral is that the Riemann integral can be pictured as sum of these infinitely many infinitesimally tiny rectangles. However to sum these rectangles you need some sort of distance measure and as I have just shown the measure of a point is 0. This means the integral of a point is 0 which is a classical result from calculus that $\int_a^af(x)=F(a)-F(a)=0$. 
Another classical fact about integrals is that they are linear which is the property that $\int_a^cf = \int_a^bf+\int_b^cf$ By this property we can see that if we are integrating a function f over the real line [0,2] but there is a discontinuity at 1 lets say that f(1) just doesn't exist for simplicity. We can use the linearity of the integral $\int_0^2 f = \int_0^1f+ \int_1^2f$. But this integral still doesn't work since it doesn't exist at 1 so we take out the 1 and take the limit which gives us $\int_0^2f = \lim_{\epsilon \to 0}\int_0^{1-\epsilon}f + \int_{1+\epsilon}^2f + \int_{1-\epsilon}^{1+\epsilon}f$. Since the third integral is 0 in the limit we can pretend that the discontinuity at 1 doesn't exist. And because of measure 0 of countable subsets of $\mathbb{R}$ we can actually do this same process with countably many points. 
A: The book's description is a bit unclear. Suppose we are given our collection of points $S$ on the real line. What it means is that, for any number $\epsilon>0$, we can choose a collection of intervals $I_1=(a_1,b_1)$, $I_2=(a_2,b_2)$, $\ldots$ such that $S$ is contained in the union $\bigcup_{k=1}^\infty I_k$ of all the intervals, and such that the sum of the lengths of all the intervals
$$\sum_{k=1}^\infty m(I_k)=\sum_{k=1}^\infty (b_k-a_k),$$
is less than or equal to $\epsilon$. Since $\epsilon$ can be any number we want, this is the sense in which the sum of the lengths of the intervals can be made arbitrarily small.
The concept of measure is based on our intuition that we can assign some sets to have sizes. Of course, these sizes should behave in reasonable ways (if a set $T$ is contained in a set $S$, then the size of $T$ should be less than or equal to the size of $S$; if $S$ and $T$ have no points in common, the size of their union should be the sum of their individual sizes; etc.) Measure 0, in this context, involves a technical definition of "size" of some subsets of the real line, called the Lebesgue measure. There is a branch of mathematics called measure theory where the details of how different "size" functions can work are explored.
A: A set of points on the x -axis is said to have measure zero if the sum of the lengths of intervals enclosing each of the points can be made arbitrarily small. If $f(x)$  is bounded in $[a,b]$ , then a necessary and sufficient condition for the existence of $∫^b_a f(x)\,dx$  is that the set of discontinuities have measure zero.
Great clarification results by replacing "all" with "each of".
A: I think the best way to answer this is by giving an example. If we look at the set $X = \mathbb{Q} \cap [0,1]$. Which is countable since it's a subset of $\mathbb{Q}$ which is countable (if you aren't familiar with the word "countable" it really just means that you can make a list with a first element a second element, .... an n'th element etc such that all elements in the set are on this list, the integers and rational numbers are countable, but the reals aren't). Now So $\mathbb{X}= \{q_i\}_{i}$ for rational numbers $q_i$ in this set. We have given an $\epsilon > 0 $ We let $I_1 = (q_1 - \epsilon/4 , q_1 + \epsilon/4)$ and let $I_n = (q_n - \epsilon/(2^{n+1}), q_n + \epsilon/(2^{n+1})) $ etc. Notice that $\cup_{n} I_n$ contains $X$ and this is what the author means by "intervals enclosing all the points". Also notice that the length of the n'th interval $I_n$ is $\epsilon/(2^n)$ hence the sum of all these intervals is given by $\sum_{n = 1}^{\infty} \epsilon/(2^n) = \epsilon$ and since $\epsilon $ was arbitrary it follows that the sum of the length of intervals enclosing all the points of $X$ can be made arbitrary small. To see what this has to do with the existence of the integral I refer you to appendix 7.9 in these notes http://www.mat.univie.ac.at/~gerald/ftp/book-fa/fa.pdf . You might have to read some of the earlier sections in chapter 7 to understand this, and you shouldn't feel down if you don't understand it all as it is quite sloppily written in my opinion. 
Added: I will try to give an intuitive explanation of what this has to do with the integral. We know that the integral $\int_{a}^{b}f(x) \; dx $ exists if the function is continous. THat is that the upper and lower riemann integrals approach the same finite limit. Now what if we for example changed the value of f at finitely many points say $a_1, \ldots a_n \in [a,b]$ and made the function discontinous at these points, but let it stay the same at all other points. Could this possibly make the lower Riemann integral different from the upper? The answer is no. This is basically because the lower riemann integral is given by $sup_{P}  \ ;L(P,f)$ where $L(P,f) = \sum_{j=1}^{n} m_j (x_j-x_{j-1})$ and P is a partition of the interval of the form $\{a=x_0, x_1, \ldots x_n = b\}$ and $m_j = inf ; f(x), \; x\in [x_{j-1},x_j]$. Now this sum is not going to change when we change $f$at finitely many points since this sum increases(or stays the same) whenever we increase the nuber of points in the partition, hence we can just keep adding more and more points to the partitions and at each discontinuity $a_i$ the term of the sum $m_j (x_j - x_{j-1})$ where $a_j \in [x_{j-1},x_j]$ gets smaller and smaller and converges to zero, hence we can just ignore it, while at all the other points everything is as before, hence the lower integral won't change, a similar argument shows that the upper sum won't change, thus we get exactly the same integral as before. Now this result can be generalised by using very similar arguments to the following: Let $X \subseteq [a,b]$ have measure zero. we define $\bar{f}$ to take the same values as $f$ on $[a,b] \setminus X$ but $\bar{f}$ and $f$ take different values on $X$. Then the inegral $\int_{a}^{b} \bar{f} \; dx $ exists and is equal to $\int_{a}^{b} f(x) \; dx $. 
I hope this clarifies what the author is talking about and makes it possible for you to follow the rest of the book.
