User:Dogmorfmocion/Sandbox2

= Comparisons and intervals =

Equal and not equal
It is important that we have the ability to compare numbers. If two numbers are equal, we write $$a = b \,$$, where a represents a number and b represents a number. These two numbers are equal if and only if they are the same. For instance, if $$a = 2$$ and $$b = 2$$ then the two numbers are equal. However, if $$b = 3$$, then they are not equal, which is written $$a \ne b$$.

Less than and greater than
Following from the previous example where $$a = 2$$ and $$b = 3$$, we can say that a is less than b, since 2 is a smaller number than 3. This is written $$a < b \,$$.

On the other hand, if $$a = 4$$ and $$b = 3$$ then we can say that a is greater than b, since 4 is a bigger number than 3. This is written $$a > b\,$$.

Additionally to this, we can combine equals and less than or greater than into one convienient symbol. If a number is less than OR equal to another number, we can write: $$a \le b$$. Conversely, if a number is greater than OR equal to another number, we can write $$a \ge b$$.

Intervals
Sometimes we are only interested in a small part of the entire set of numbers we are working with. If we imagine all the real numbers $$\mathbb{R}$$ on a line, a section of this line is known as an interval. We can write intervals two ways. As inclusive or closed intervals, using square brackets [ and ]:

[4, 9] = All real numbers from 4 through to 9.

Or, we can write them as exclusive or open intervals, using normal brackets ( and ):

(4, 9) = All real numbers between 4 and 9 but NOT including 4 and 9.

Note that we can use equality signs to indicate an interval. For instance, [4, 9] is the same as writing $$4 \le a \le 9$$, where a is a real number, and (4, 9) is the same as writing $$4 < a < 9 \,$$. Finally, note that we can mix our choice of brackets in order to specify inclusive and exclusive intervals. For instance:

[4, 9) = All real numbers between 4 and 9 but NOT including 9.

= Questions =

1. True or false?

a) $$5 = 5 \,$$

b) $$3 = 7 \,$$

c) $$8.34 \ne 8.33$$

2. a = 14 and b = 99. True or false?

a) $$b > a \,$$

b) $$a \le b$$

c) $$-3 < b < 100 \,$$

d) $$100 > a > 95 \,$$

e) $$14 \le a \le b$$

3. List all the integers (numbers in $$\mathbb{Z}$$) in the following intervals.

a) [30, 34]

b) [-1, 0]

c) (3, 9)

d) [5, 9)

e) (5, 9]