### Integers

Recall that mathematically, an *integer *is a counting number (1,2,3, ...) along with 0 and the negative counting numbers (−1, −2, −3, . Practically speaking, we will limit an integer to some number of bits and the standard sizes are 8, 16, 32, 64 and 128.

#### Unsigned Integers

First, we will examine unsigned integers and typically these are thought of as the non- negative integers (0,1,2,3, ...). For example, 8-bit unsigned integers have a total of (2^8 = 256) nonnegative numbers and since the smallest is 0, the largest is 255.

In julia, the data types for unsigned integers are`UInt8, UInt16, UIint32, UInt64`

and`UInt128`

. We can get the smallest and largest value for these with the`typemin`

and`typemax`

functions.

Appendix XXXX covers many of the details of representation integers in binary and performing basic operations. We will cover the a superficial level of integer represenation and operations here in this chapter, but for those with desire for more depth see Appendix XXX

In julia, we can use the`bitstring`

function to give the binary representation of integers and floating points. For example

and

Similarly, the unsigned integers with more bits work the same with largest range of integers. For example

which is a string of length 64.

#### Signed Integers

In julia, the signed integers are`Int8, Int16, Iint32, Int64`

and`Int128`

. Also, there is a integer type`Int`

which defaults to the sized integer of the typical integer size on your machine. This is generally`Int64`

.

Let’s look in detail about 8-bit signed integers. The largest and smallest values that can be stored with Int8 can be found with

Bascially the number between 0 and 127 are identical between Int8 and UInt8.

#### Overflow and Underflow of integer operations

Again, unlike mathematical integers, any computer-based integer has a maximum and minimum values. In short, if an operation results in a number above the maximum, then there is an overflow error and less than the minimum there is an underflow error.

Here’s a simple example with 8-bit integers. Let

and

The sum of 95 and 70 is 165 and above the maximum value for`Int8`

. However, entering

returns a strange result. Perhaps we expected an error. What just happened? If you want to know why the value of -91 arose, dig into the details in Chapter XXX, but the reason why there was no overflow error is that julia does not automatically check for such errors, due to the fact that there is overhead in checking, which will slow down operations.

If you want to check, there are a suite of operations that will check, therefore:

Go to julia’s documentation on checked_add which starts a list of functions that will check for over and underflow. If there is any chance of overflow/underflow errors, then the results may be wrong. Keep this in mind as in Chapter XXXX we will write tests for code.

## 3.1: Integers - Mathematics

It is more surprising, less obvious, and perhaps quite counterintuitive that the set of natural numbers is also equivalent to the set of rational numbers. To show that these sets are indeed equivalent we must order the rational numbers. The following proof is due to George Cantor. For ease of exhibition let us just consider the positive rational numbers. (To incorporate negative rational numbers we can, for example, pair even natural numbers with positive rational numbers, and odd natural numbers with negative rational numbers.)

(Positive) rational numbers are of the form p/q where p and q are natural numbers. These can be arranged in a table:

Of course, not all entries of this table are distinct. For example

In the next step we therefor erase all rational numbers that have non-trivial common factors in numerator and denominator.

Finally, to associate these numbers with 1, 2, 3, . we start in the North-West corner of the Table, move down one row, go up diagonally in a North-East direction, until we reach the first row, go one column to the right, go back down in a South-West direction until we hit the first column, and continue in this manner:

## Integers

Positive integers are all the whole numbers greater than zero: 1, 2, 3, 4, 5, . . Negative integers are all the opposites of these whole numbers: -1, -2, -3, -4, -5, …. We do not consider zero to be a positive or negative number. For each positive integer, there is a negative integer, and these integers are called opposites. For example, -3 is the opposite of 3, -21 is the opposite of 21, and 8 is the opposite of -8. If an integer is greater than zero, we say that its *sign* is positive. If an integer is less than zero, we say that its *sign* is negative.

Integers are useful in comparing a direction associated with certain events. Suppose I take five steps forwards: this could be viewed as a positive 5. If instead, I take 8 steps *backwards* , we might consider this a -8. Temperature is another way negative numbers are used. On a cold day, the temperature might be 10 degrees below zero Celsius, or -10° *C* .

### The Number Line

The number line is a line labeled with the integers in increasing order from left to right, that extends in both directions:

For any two different places on the number line, the integer on the right is greater than the integer on the left.

### Absolute Value of an Integer

The number of units a number is from zero on the number line. The absolute value of a number is always a positive number (or zero). We specify the absolute value of a number *n* by writing *n* in between two vertical bars: | *n* |.

|6| = 6

|-12| = 12

|0| = 0

|1234| = 1234

|-1234| = 1234

### Adding Integers

1) When adding integers of the same sign, we add their absolute values, and give the result the same sign.

2 + 5 = 7

(-7) + (-2) = -(7 + 2) = -9

(-80) + (-34) = -(80 + 34) = -114

2) When adding integers of the opposite signs, we take their absolute values, subtract the smaller from the larger, and give the result the sign of the integer with the larger absolute value.

8 + (-3) = ?

The absolute values of 8 and -3 are 8 and 3. Subtracting the smaller from the larger gives 8 - 3 = 5, and since the larger absolute value was 8, we give the result the same sign as 8, so 8 + (-3) = 5.

8 + (-17) = ?

The absolute values of 8 and -17 are 8 and 17.

Subtracting the smaller from the larger gives 17 - 8 = 9, and since the larger absolute value was 17, we give the result the same sign as -17, so 8 + (-17) = -9.

-22 + 11 = ?

The absolute values of -22 and 11 are 22 and 11. Subtracting the smaller from the larger gives 22 - 11 = 11, and since the larger absolute value was 22, we give the result the same sign as -22, so -22 + 11 = -11.

The absolute values of 53 and -53 are 53 and 53. Subtracting the smaller from the larger gives 53 - 53 =0. The sign in this case does not matter, since 0 and -0 are the same. Note that 53 and -53 are opposite integers. All opposite integers have this property that their sum is equal to zero. Two integers that add up to zero are also called additive inverses.

### Subtracting Integers

Subtracting an integer is the same as adding its opposite.

In the following examples, we convert the subtracted integer to its opposite, and add the two integers.

7 - 4 = 7 + (-4) = 3

12 - (-5) = 12 + (5) = 17

-8 - 7 = -8 + (-7) = -15

-22 - (-40) = -22 + (40) = 18

Note that the result of subtracting two integers could be positive or negative.

### Multiplying Integers

To multiply a pair of integers if both numbers have the same sign, their product is the product of their absolute values (their product is positive). If the numbers have opposite signs, their product is the *opposite* of the product of their absolute values (their product is negative). If one or both of the integers is 0, the product is 0.

In the product below, both numbers are positive, so we just take their product.

4 × 3 = 12

In the product below, both numbers are negative, so we take the product of their absolute values.

(-4) × (-5) = |-4| × |-5| = 4 × 5 = 20

In the product of (-7) × 6, the first number is negative and the second is positive, so we take the product of their absolute values, which is |-7| × |6| = 7 × 6 = 42, and give this result a negative sign: -42, so (-7) × 6 = -42.

In the product of 12 × (-2), the first number is positive and the second is negative, so we take the product of their absolute values, which is |12| × |-2| = 12 × 2 = 24, and give this result a negative sign: -24, so 12 × (-2) = -24.

**To multiply any number of integers:**

1. Count the number of negative numbers in the product.

2. Take the product of their absolute values.

3. If the number of negative integers counted in step 1 is even, the product is just the product from step 2, if the number of negative integers is odd, the product is the opposite of the product in step 2 (give the product in step 2 a negative sign). If any of the integers in the product is 0, the product is 0.

Counting the number of negative integers in the product, we see that there are 3 negative integers: -2, -11, and -5. Next, we take the product of the absolute values of each number:

4 × |-2| × 3 × |-11| × |-5| = 1320.

Since there were an odd number of integers, the product is the opposite of 1320, which is -1320, so

4 × (-2) × 3 × (-11) × (-5) = -1320.

### Dividing Integers

To divide a pair of integers if both integers have the same sign, divide the absolute value of the first integer by the absolute value of the second integer.

To divide a pair of integers if both integers have different signs, divide the absolute value of the first integer by the absolute value of the second integer, and give this result a negative sign.

In the division below, both numbers are positive, so we just divide as usual.

4 ÷ 2 = 2.

In the division below, both numbers are negative, so we divide the absolute value of the first by the absolute value of the second.

(-24) ÷ (-3) = |-24| ÷ |-3| = 24 ÷ 3 = 8.

In the division (-100) ÷ 25, both number have different signs, so we divide the absolute value of the first number by the absolute value of the second, which is |-100| ÷ |25| = 100 ÷ 25 = 4, and give this result a negative sign: -4, so (-100) ÷ 25 = -4.

In the division 98 ÷ (-7), both number have different signs, so we divide the absolute value of the first number by the absolute value of the second, which is |98| ÷ |-7| = 98 ÷ 7 = 14, and give this result a negative sign: -14, so 98 ÷ (-7) = -14.

### Integer coordinates

Integer coordinates are pairs of integers that are used to determine points in a grid, relative to a special point called the origin. The origin has coordinates (0,0). We can think of the origin as the center of the grid or the starting point for finding all other points. Any other point in the grid has a pair of coordinates (x,y). The x value or x-coordinate tells how many steps left or right the point is from the point (0,0), just like on the number line (negative is left of the origin, positive is right of the origin). The y value or y-coordinate tells how many steps up or down the point is from the point (0,0), (negative is down from the origin, positive is up from the origin). Using coordinates, we may give the location of any point in the grid we like by simply using a pair of numbers.

The origin below is where the x-axis and the y-axis meet. Point A has coordinates (2,3), since it is 2 units to the right and 3 units up from the origin. Point B has coordinates (3,1), since it is 3 units to the right, and 1 unit up from the origin. Point C has coordinates (8,-5), since it is 8 units to the right, and 5 units down from the origin. Point D has coordinates (9,-8) it is 9 units to the right, and 8 units down from the origin. Point E has coordinates (-4,-3) it is 4 units to the left, and 3 units down from the origin. Point F has coordinates (-7,6) it is 7 units to the left, and 6 units up from the origin.

### Comparing Integers

We can compare two different integers by looking at their positions on the number line. For any two different places on the number line, the integer on the right is greater than the integer on the left. Note that every positive integer is greater than any negative integer.

9 > 4, 6 > -9, -2 > -8, and 0 > -5

-2 < 1, 8 < 11, -7 < -5, and -10 < 0

### Numbers

#### Natural numbers

#### Whole numbers

#### Integers

< &hellip , &minus3 , &minus2 , &minus1 , 0 , 1 , 2 , 3 , &hellip >. It is useful to note that the set of integers is made up of three distinct subsets: negative integers, zero, and positive integers. In this sense, the positive integers are just the natural numbers. Another way to think about it is that the natural numbers are a subset of the integers.

### Fractions

**Fractions** are a way to represent parts of a whole. It is written where and are integers and In a fraction, is called the numerator and is called the denominator. The denominator represents the number of equal parts the whole has been divided into, and the numerator represents how many parts are included. The denominator, cannot equal zero because division by zero is undefined.

of the circle. This type of model is called a fraction circle. Other shapes, such as rectangles, can also be used to model fractions.

/> represent? The fraction /> means two of three equal parts.

#### Improper and Proper Fractions

numerator is greater than or equal to the denominator , so its value is greater than or equal to one. Fractions such as , , , and are called improper fractions.

, , and are proper fractions.

#### Equivalent Fractions

and have the same value, 1. Figure shows two images: a single pizza on the left, cut into two equal pieces, and a second pizza of the same size, cut into eight pieces on the right. This is a way to show that is equivalent to . In other words, they are equivalent fractions .

is equivalent to .

## 3.1.2 Fractions, decimals and percentages

Additional foundation content

work interchangeably with terminating decimals and their corresponding fractions (such as 3.5 and or 0.375 and

change recurring decimals into their corresponding fractions and vice versa

**Notes:** including ordering.

Additional foundation content

identify and work with fractions in ratio problems

**Notes:** See also R8

Additional foundation content

interpret fractions and percentages as operators

**Notes:** including interpreting percentage problems using a multiplier. See also R9

## Properties of Integers

### Properties of addition

**Closure Property:** Let a and b be any two integers, then a + b will always be an integer. This is called the closure property of addition of integers.

**Commutative Property:** If a and b are two integers, then a + b = b + a, i.e., on changing the order of integers, we get the same result. This is called the commutative property of addition of integers.

**Associative Property:** If a, b, and c are three integers, then a + (b + c) = (a + b) + c, i.e., in the addition of integers, we get the same result, even the grouping is changed. This is called the associative property of addition of integers.

Examples : [(– 3) + (– 4)] + (8) = (– 3) + [(– 4) + 8]

**Additive identity :** If zero is added to any integer, the value of integer does not change. If ‘a’ is an integer, then a + 0 = a = 0 + a. Hence, zero is called the additive identity of integers. Examples :

**Additive Inverse :** When an integer is added to its opposite, we get the result as zero (additive identity). If a is an integer, then (– a) is its opposite (or vice– versa) such that

Thus, an integer and its opposite are called the additive inverse of each other.

**Property of 1:** Addition of 1 to any integer gives its successor.

Hence, 8 is the successor of 7.

Hence, (– 4) is the successor of (– 5).

### Practice More Mathematics Quiz Here

### Properties of subtraction

**Closure Property:** If a and b are two integers, then a – b will always be an integer. This is called the closure property of subtraction of integers.

**Commutative Property:** If a and b are two integers, then a – b b – a, i.e., commutative property does not hold good for the subtraction of integers.

Examples: 7– (– 8) = 15 but (– 8) – 7 = – 15

Hence, subtraction of integers is not commutative.

**Associative Property:** If a, b and c are three integers, then (a – b) – C a – (b – c), i.e., associative property does not hold good for the subtraction of integers.

Hence, subtraction of integers is not associative.

**Property of Zero:** When zero is subtracted from an integer, we get the same integer, i.e., a– 0 = a, where ‘a’ is an integer.

**Property of 1:** Subtraction of 1 from any integer gives its predecessor.

(a) 7– 1 = 6 (6 is predecessor of 7.)

(b) (– 3) – 1 = (– 4) [(– 4) is predecessor of (– 3).]

### Properties of multiplication

**Closure Property:** If a and b are two integers then a × b will also be an integer. This is called the closure property of multiplication of integers.

**Commutative Property:** If a and b are two integers, then a × b=b × a, i.e., on changing the order of integers, we get the same result. This is called the commutative property of multiplication of integers.

Examples: (a) 7 × 2 = 2 × 7 = 14

Thus, commutative property holds good for the multiplication of integers.

**Associative Property:** If a, b and c are three integers, then a × (b × c) = (a × b) × c. This is called the associative property of multiplication of integers.

Examples: (3 × 4) × 5 = 3 × (4 × 5)

Thus, associative property holds good for the multiplication of integers.

**Multiplicative Identity:** The product of any integer and 1 gives the same integer. If ‘a’ is an integer, then a × 1 = a = 1 × a.

Hence, 1 is called the multiplicative identity.

**Multiplicative Inverse:** The product of any integer and its reciprocal gives the result as 1 (multiplicative identity). If ‘a’ is an integer, then a × = 1 = × a. Thus, an integer and its reciprocal are called the multiplicative inverse of each other.

**Property of Zero :** The product of any integer and zero gives the result as zero. If ‘a’ is an integer, then a × 0 = 0 × a = 0.

**Distributive Property:** Multiplication distributes over addition. If a, b, and c are three integers, then a × (b + c) = ab + ac. This is called the distributive property of multiplication of integers.

Examples : (– 7) × [3 + (– 4)] = (– 7) (3) + (– 7) × (– 4)

### Properties of division

**Closure Property:** Closure property does not hold good for division of integers.

Examples: 12 ÷ 3 = 4 (4 is an integer.)

**Commutative Property:** If a and b are two integers, then a ÷ b b ÷ a.

Examples: (a) 4 ÷ 2 = 2 but 2 ÷ 4 =

**Associative Property :** If a, b, c are three integers, then (a ÷ b) + c a ÷ (b ÷ c)

Example : (24 ÷ 4) ÷ (– 2) 24 ÷ [4 ÷ (– 2)]

**Property of Zero :** When zero is divided by any integer, the result is always zero. If a is and integer, then 0 ÷ a = 0.

## Contents

The symbol ℤ can be annotated to denote various sets, with varying usage amongst different authors: ℤ + , [4] ℤ_{+} or ℤ > for the positive integers, ℤ 0+ or ℤ ≥ for non-negative integers, and ℤ ≠ for non-zero integers. Some authors use ℤ * for non-zero integers, while others use it for non-negative integers, or for <–1, 1>. Additionally, ℤ_{p} is used to denote either the set of integers modulo *p* [4] (i.e., the set of congruence classes of integers), or the set of *p* -adic integers. [8] [9] [10]

Like the natural numbers, ℤ is closed under the operations of addition and multiplication, that is, the sum and product of any two integers is an integer. However, with the inclusion of the negative natural numbers (and importantly, 0), ℤ , unlike the natural numbers, is also closed under subtraction. [11]

The integers form a unital ring which is the most basic one, in the following sense: for any unital ring, there is a unique ring homomorphism from the integers into this ring. This universal property, namely to be an initial object in the category of rings, characterizes the ring ℤ .

ℤ is not closed under division, since the quotient of two integers (e.g., 1 divided by 2) need not be an integer. Although the natural numbers are closed under exponentiation, the integers are not (since the result can be a fraction when the exponent is negative).

The following table lists some of the basic properties of addition and multiplication for any integers *a* , *b* and *c* :

Properties of addition and multiplication on integers

Addition | Multiplication | |
---|---|---|

Closure: | a + b is an integer | a × b is an integer |

Associativity: | a + (b + c) = (a + b) + c | a × (b × c) = (a × b) × c |

Commutativity: | a + b = b + a | a × b = b × a |

Existence of an identity element: | a + 0 = a | a × 1 = a |

Existence of inverse elements: | a + (−a) = 0 | The only invertible integers (called units) are −1 and 1 . |

Distributivity: | a × (b + c) = (a × b) + (a × c) and (a + b) × c = (a × c) + (b × c) | |

No zero divisors: | If a × b = 0 , then a = 0 or b = 0 (or both) |

In the language of abstract algebra, the first five properties listed above for addition say that ℤ , under addition, is an abelian group. It is also a cyclic group, since every non-zero integer can be written as a finite sum 1 + 1 + … + 1 or (−1) + (−1) + … + (−1) . In fact, ℤ under addition is the *only* infinite cyclic group—in the sense that any infinite cyclic group is isomorphic to ℤ .

The first four properties listed above for multiplication say that ℤ under multiplication is a commutative monoid. However, not every integer has a multiplicative inverse (as is the case of the number 2), which means that ℤ under multiplication is not a group.

All the rules from the above property table (except for the last), when taken together, say that ℤ together with addition and multiplication is a commutative ring with unity. It is the prototype of all objects of such algebraic structure. Only those equalities of expressions are true in ℤ for all values of variables, which are true in any unital commutative ring. Certain non-zero integers map to zero in certain rings.

The lack of zero divisors in the integers (last property in the table) means that the commutative ring ℤ is an integral domain.

The lack of multiplicative inverses, which is equivalent to the fact that ℤ is not closed under division, means that ℤ is *not* a field. The smallest field containing the integers as a subring is the field of rational numbers. The process of constructing the rationals from the integers can be mimicked to form the field of fractions of any integral domain. And back, starting from an algebraic number field (an extension of rational numbers), its ring of integers can be extracted, which includes ℤ as its subring.

Although ordinary division is not defined on ℤ , the division "with remainder" is defined on them. It is called Euclidean division, and possesses the following important property: given two integers *a* and *b* with *b* ≠ 0 , there exist unique integers *q* and *r* such that *a* = *q* × *b* + *r* and 0 ≤ *r* < | *b* | , where | *b* | denotes the absolute value of *b* . [12] The integer *q* is called the *quotient* and *r* is called the *remainder* of the division of *a* by *b* . The Euclidean algorithm for computing greatest common divisors works by a sequence of Euclidean divisions.

Again, in the language of abstract algebra, the above says that ℤ is a Euclidean domain. This implies that ℤ is a principal ideal domain, and any positive integer can be written as the products of primes in an essentially unique way. [13] This is the fundamental theorem of arithmetic.

ℤ is a totally ordered set without upper or lower bound. The ordering of ℤ is given by: . −3 < −2 < −1 < 0 < 1 < 2 < 3 < . An integer is *positive* if it is greater than zero, and *negative* if it is less than zero. Zero is defined as neither negative nor positive.

The ordering of integers is compatible with the algebraic operations in the following way:

- if
*a*<*b*and*c*<*d*, then*a*+*c*<*b*+*d* - if
*a*<*b*and 0 <*c*, then*ac*<*bc*.

Thus it follows that ℤ together with the above ordering is an ordered ring.

The integers are the only nontrivial totally ordered abelian group whose positive elements are well-ordered. [14] This is equivalent to the statement that any Noetherian valuation ring is either a field—or a discrete valuation ring.

In elementary school teaching, integers are often intuitively defined as the (positive) natural numbers, zero, and the negations of the natural numbers. However, this style of definition leads to many different cases (each arithmetic operation needs to be defined on each combination of types of integer) and makes it tedious to prove that integers obey the various laws of arithmetic. [15] Therefore, in modern set-theoretic mathematics, a more abstract construction [16] allowing one to define arithmetical operations without any case distinction is often used instead. [17] The integers can thus be formally constructed as the equivalence classes of ordered pairs of natural numbers (*a*,*b*) . [18]

The intuition is that (*a*,*b*) stands for the result of subtracting *b* from *a* . [18] To confirm our expectation that 1 − 2 and 4 − 5 denote the same number, we define an equivalence relation

on these pairs with the following rule:

Addition and multiplication of integers can be defined in terms of the equivalent operations on the natural numbers [18] by using [(*a*,*b*)] to denote the equivalence class having (*a*,*b*) as a member, one has:

The negation (or additive inverse) of an integer is obtained by reversing the order of the pair:

Hence subtraction can be defined as the addition of the additive inverse:

[ ( a , b ) ] − [ ( c , d ) ] := [ ( a + d , b + c ) ] .

The standard ordering on the integers is given by:

It is easily verified that these definitions are independent of the choice of representatives of the equivalence classes.

Every equivalence class has a unique member that is of the form (*n*,0) or (0,*n*) (or both at once). The natural number *n* is identified with the class [(*n*,0)] (i.e., the natural numbers are embedded into the integers by map sending *n* to [(*n*,0)] ), and the class [(0,*n*)] is denoted −*n* (this covers all remaining classes, and gives the class [(0,0)] a second time since −0 = 0.

Thus, [(*a*,*b*)] is denoted by

If the natural numbers are identified with the corresponding integers (using the embedding mentioned above), this convention creates no ambiguity.

This notation recovers the familiar representation of the integers as <…, −2, −1, 0, 1, 2, … >.

In theoretical computer science, other approaches for the construction of integers are used by automated theorem provers and term rewrite engines. Integers are represented as algebraic terms built using a few basic operations (e.g., **zero**, **succ**, **pred**) and, possibly, using natural numbers, which are assumed to be already constructed (using, say, the Peano approach).

There exist at least ten such constructions of signed integers. [19] These constructions differ in several ways: the number of basic operations used for the construction, the number (usually, between 0 and 2) and the types of arguments accepted by these operations the presence or absence of natural numbers as arguments of some of these operations, and the fact that these operations are free constructors or not, i.e., that the same integer can be represented using only one or many algebraic terms.

The technique for the construction of integers presented above in this section corresponds to the particular case where there is a single basic operation **pair** ( x , y ) **pair**(0,0), or **pair**(1,1), or **pair**(2,2), etc. This technique of construction is used by the proof assistant Isabelle however, many other tools use alternative construction techniques, notable those based upon free constructors, which are simpler and can be implemented more efficiently in computers.

An integer is often a primitive data type in computer languages. However, integer data types can only represent a subset of all integers, since practical computers are of finite capacity. Also, in the common two's complement representation, the inherent definition of sign distinguishes between "negative" and "non-negative" rather than "negative, positive, and 0". (It is, however, certainly possible for a computer to determine whether an integer value is truly positive.) Fixed length integer approximation data types (or subsets) are denoted *int* or Integer in several programming languages (such as Algol68, C, Java, Delphi, etc.).

Variable-length representations of integers, such as bignums, can store any integer that fits in the computer's memory. Other integer data types are implemented with a fixed size, usually a number of bits which is a power of 2 (4, 8, 16, etc.) or a memorable number of decimal digits (e.g., 9 or 10).

The cardinality of the set of integers is equal to ℵ_{0} (aleph-null). This is readily demonstrated by the construction of a bijection, that is, a function that is injective and surjective from ℤ to ℕ . If ℕ₀ ≡ <0, 1, 2, . >then consider the function:

If ℕ ≡ <1, 2, 3, . >then consider the function:

If the domain is restricted to ℤ then each and every member of ℤ has one and only one corresponding member of ℕ and by the definition of cardinal equality the two sets have equal cardinality.

**^***Integer*'s first literal meaning in Latin is "untouched", from*in*("not") plus*tangere*("to touch"). "Entire" derives from the same origin via the French word*entier*, which means both*entire*and*integer*. [1]

**^**Evans, Nick (1995). "A-Quantifiers and Scope". In Bach, Emmon W. (ed.).*Quantification in Natural Languages*. Dordrecht, The Netherlands Boston, MA: Kluwer Academic Publishers. p. 262. ISBN978-0-7923-3352-4 .**^**- Weisstein, Eric W."Counting Number".
*MathWorld*. **^**- Weisstein, Eric W."Whole Number".
*MathWorld*. - ^
**a****b****c** - "Compendium of Mathematical Symbols".
*Math Vault*. 1 March 2020 . Retrieved 11 August 2020 . **^**- Weisstein, Eric W. "Integer".
*mathworld.wolfram.com*. Retrieved 11 August 2020 . **^**- Miller, Jeff (29 August 2010). "Earliest Uses of Symbols of Number Theory". Archived from the original on 31 January 2010 . Retrieved 20 September 2010 .
**^**- Peter Jephson Cameron (1998).
*Introduction to Algebra*. Oxford University Press. p. 4. ISBN978-0-19-850195-4 . Archived from the original on 8 December 2016 . Retrieved 15 February 2016 . **^**Keith Pledger and Dave Wilkins, "Edexcel AS and A Level Modular Mathematics: Core Mathematics 1" Pearson 2008**^**LK Turner, FJ BUdden, D Knighton, "Advanced Mathematics", Book 2, Longman 1975.**^**- Weisstein, Eric W."Z^*".
*MathWorld*. **^**- "Integer | mathematics".
*Encyclopedia Britannica*. Retrieved 11 August 2020 . **^**- "The Definitive Higher Math Guide to Long Division and Its Variants — for Integers".
*Math Vault*. 24 February 2019 . Retrieved 11 August 2020 . **^**- Serge, Lang (1993).
*Algebra*(3rd ed.). Addison-Wesley. pp. 86–87. ISBN978-0-201-55540-0 . **^**- Warner, Seth (2012).
*Modern Algebra*. Dover Books on Mathematics. Courier Corporation. Theorem 20.14, p. 185. ISBN978-0-486-13709-4 . Archived from the original on 6 September 2015 . Retrieved 29 April 2015 . . **^**- Mendelson, Elliott (2008).
*Number Systems and the Foundations of Analysis*. Dover Books on Mathematics. Courier Dover Publications. p. 86. ISBN978-0-486-45792-5 . Archived from the original on 8 December 2016 . Retrieved 15 February 2016 . . **^**Ivorra Castillo:*Álgebra***^**- Frobisher, Len (1999).
*Learning to Teach Number: A Handbook for Students and Teachers in the Primary School*. The Stanley Thornes Teaching Primary Maths Series. Nelson Thornes. p. 126. ISBN978-0-7487-3515-0 . Archived from the original on 8 December 2016 . Retrieved 15 February 2016 . . - ^
**a****b****c** - Campbell, Howard E. (1970).
*The structure of arithmetic*. Appleton-Century-Crofts. p. 83. ISBN978-0-390-16895-5 . **^**- Garavel, Hubert (2017).
*On the Most Suitable Axiomatization of Signed Integers*. Post-proceedings of the 23rd International Workshop on Algebraic Development Techniques (WADT'2016). Lecture Notes in Computer Science.**10644**. Springer. pp. 120–134. doi:10.1007/978-3-319-72044-9_9. Archived from the original on 26 January 2018 . Retrieved 25 January 2018 .

- ,
- Herstein, I.N.,
*Topics in Algebra*, Wiley 2 edition (June 20, 1975), 0-471-01090-1. , and Garrett Birkhoff*Algebra*, American Mathematical Society 3rd edition (1999). 0-8218-1646-2.

*Men of Mathematics.*New York: Simon & Schuster, 1986. (Hardcover 0-671-46400-0)/(Paperback 0-671-62818-6)

*This article incorporates material from Integer on PlanetMath, which is licensed under the Creative Commons Attribution/Share-Alike License.*

## Step by step guide to ordering integers and numbers

- When using a number line, numbers increase as you move to the right.
- When comparing two numbers, think about their position on the number line. If one number is on the right side of another number, it is a bigger number. For example, (- 3) is bigger than (- 5) because it is on the right side of (- 5) on number line.

### Ordering Integers and Numbers – Example 1:

Order this set of integers from least to greatest. (- 4, – 1, – 5, 4, 2, 7)

The smallest number is (- 5) and the largest number is (7).

Now compare the integers and order them from least to greatest:

(- 5 < – 4 < – 1 < 2 < 4 < 7)

### Ordering Integers and Numbers – Example 2:

Order this set of integers from greatest to least. (3, – 2, – 1, 6, – 9, 8)

The largest number is (8) and the smallest number is (- 9).

Now compare the integers and order them from greatest to least:

( 8 > 6 > 3 > – 1 > – 2 > – 9 )

### Ordering Integers and Numbers – Example 3:

Order this set of integers from least to greatest. (-2,1,-5,-1,2,4)

The smallest number is (-5) and the largest number is (4).

Now compare the integers and order them from greatest to least:

(-5<-2<-1<1<2<4)

### Ordering Integers and Numbers – Example 4:

Order each set of integers from greatest to least. (10,-6,-2,5,-8,4)

The largest number is (10) and the smallest number is (-8).

Now compare the integers and order them from least to greatest:

(10>5>4>-2>-6>-8)

## 3.1: Integers - Mathematics

Introduction to Integers and their Absolute Value

**Natural numbers**

The counting numbers 1, 2, 3, . are called natural numbers.

The set of natural number is denoted by the letter N.

1 is the smallest natural number. The set of natural numbers, N is an infinite set.

**Whole numbers**

The numbers 0, 1, 2, 3, . are called whole numbers.

The set of whole numbers is denoted by the letter W.

0 is the smallest whole number. The set of whole numbers, W is an infinite set.

We had observed that adding any two whole numbers always gives a whole number. We can examine whether this case is true for the operation &lsquosubtraction&rsquo. Let us consider the following examples:

We can observe that in the last case, the operation &lsquosubtraction&rsquo cannot be performed in the system of whole numbers i.e., when a bigger whole number is subtracted from a smaller whole number. In order to solve such type of problems, the system of whole numbers has to be enlarged by introducing another kind of numbers called **negative integers**. These numbers are obtained by putting &ldquo&minus&rdquo sign before the counting numbers 1, 2, 3, &hellip That is, negative integers are &minus1, &minus2, &minus3 &hellip

The most common real life example of negative integers is the temperature of our surroundings. In winters, sometimes the temperature drops down to a negative value say &minus1, &minus3. So, in such cases negative integers are highly used.

All positive and all negative numbers including zero are called **integers** (or **directed numbers** or **signed numbers**). That is, the numbers &hellip&minus3, &minus2, &minus1, 0, 1, 2, 3&hellip are called integers. The collection or set of all integers is an infinite set and usually it is denoted by **I** or **Z.**

**Convention**: If there is no sign in front of a number, then we treat it as a positive number.

However, the number &lsquo0&rsquo is taken as neutral i.e., 0 is always written without any sign.

**I** or **Z** =

**Absolute value of an integer**

The **absolute value** of an integer is its numerical value regardless of its sign. The absolute value of an integer *n* is denoted as |*n|*.

Therefore, |&minus10| = 10, |&minus2| = 2, |0| = 0, |7| = 7 etc.

**Note:** The absolute value of any integer is always non-negative.

**Opposite of an integer**

Numbers which are represented by points such that they are at equal distances from the origin but on the opposite sides of it are called **opposite numbers**.

Thus, the opposite of an integer is the integer with its sign reversed. The opposite of integer *a* is &minus *a* and the opposite of integer &minus *b* is +*b* or *b* as *a* and &minus *a* &minus *b* and +*b* are at equal distance from the origin but on the opposite sides.

Thus, opposite of 5 is &minus 5, opposite of &minus 8 is 8.

Let us discuss some examples based on these concepts.

Write the absolute value of 4, &minus 19, 23 and &minus1.

The absolute value of 4 = |4| = 4.

The absolute value of &minus19 = |&minus19| = 19.

The absolute value of 23 = |23| = 23.

The absolute value of &minus1 = |&minus1| = 1.

The absolute value of two integers are 11 and 0. What could be the possible value(s) of the those integers?

If the absolute value of an integer is 11, then the possible values of that integer could be ±11 i.e., 11 or &minus11.

If the absolute value of an integer is 0, then the possible value of that integer could be 0 .

What are the opposite of integers 51, &minus927 and &minus7?

The opposite of &minus927 is 927.

**Natural numbers**

The counting numbers 1, 2, 3, . are called natural numbers.

The set of natural number is denoted by the letter N.

1 is the smallest natural number. The set of natural numbers, N is an infinite set.

**Whole numbers**

The numbers 0, 1, 2, 3, . are called whole numbers.

The set of whole numbers is denoted by the letter W.

0 is the smallest whole number. The set of whole numbers, W is an infinite set.

We had observed that adding any two whole numbers always gives a whole number. We can examine whether this case is true for the operation &lsquosubtraction&rsquo. Let us consider the following examples:

We can observe that in the last case, the operation &lsquosubtraction&rsquo cannot be performed in the system of whole numbers i.e., when a bigger whole number is subtracted from a smaller whole number. In order to solve such type of problems, the system of whole numbers has to be enlarged by introducing another kind of numbers called **negative integers**. These numbers are obtained by putting &ldquo&minus&rdquo sign before the counting numbers 1, 2, 3, &hellip That is, negative integers are &minus1, &minus2, &minus3 &hellip

The most common real life example of negative integers is the temperature of our surroundings. In winters, sometimes the temperature drops down to a negative value say &minus1, &minus3. So, in such cases negative integers are highly used.

All positive and all negative numbers including zero are called **integers** (or **directed numbers** or **signed numbers**). That is, the numbers &hellip&minus3, &minus2, &minus1, 0, 1, 2, 3&hellip are called integers. The collection or set of all integers is an infinite set and usually it is denoted by **I** or **Z.**

**Convention**: If there is no sign in front of a number, then we treat it as a positive number.

However, the number &lsquo0&rsquo is taken as neutral i.e., 0 is always written without any sign.

**I** or **Z** =

**Absolute value of an integer**

The **absolute value** of an integer is its numerical value regardless of its sign. The absolute value of an integer *n* is denoted as |*n|*.

Therefore, |&minus10| = 10, |&minus2| = 2, |0| = 0, |7| = 7 etc.

**Note:** The absolute value of any integer is always non-negative.

**Opposite of an integer**

Numbers which are represented by points such that they are at equal distances from the origin but on the opposite sides of it are called **opposite numbers**.

Thus, the opposite of an integer is the integer with its sign reversed. The opposite of integer *a* is &minus *a* and the opposite of integer &minus *b* is +*b* or *b* as *a* and &minus *a* &minus *b* and +*b* are at equal distance from the origin but on the opposite sides.

Thus, opposite of 5 is &minus 5, opposite of &minus 8 is 8.

Let us discuss some examples based on these concepts.

Write the absolute value of 4, &minus 19, 23 and &minus1.

The absolute value of 4 = |4| = 4.

The absolute value of &minus19 = |&minus19| = 19.

The absolute value of 23 = |23| = 23.

The absolute value of &minus1 = |&minus1| = 1.

The absolute value of two integers are 11 and 0. What could be the possible value(s) of the those integers?

If the absolute value of an integer is 11, then the possible values of that integer could be ±11 i.e., 11 or &minus11.

If the absolute value of an integer is 0, then the possible value of that integer could be 0 .

What are the opposite of integers 51, &minus927 and &minus7?

The opposite of &minus927 is 927.

We know how to perform addition, subtraction, multiplication and division on whole numbers. Till now, we have solved expressions involving only one mathematical operation such as 35 × 42, 50 + 14, 614 &ndash 126, 24 ÷ 6, etc.

Now, let us learn how to solve expressions involving more than one mathematical operation.

Look at the following expression.

To solve this expression, one may proceed in following two manners:

= 120 &ndash 3 (By solving multiplication)

= 117 (By solving subtraction)

= 15 × 5 (By solving subtraction)

= 75 (By solving multiplication)

Now, let us take another example.

Let us solve the expression 54 ÷ 6 + 3.

= 54 ÷ 9 (By solving addition)

It can be seen that, we have obtained two different values for each of the expression. This happened because we have followed two different orders to perform the operations while solving th…

## Rules for Multiplying and Dividing Integers

Issues arise when multiplying or dividing integers when the numbers used are not natural numbers, i.e., not positive whole numbers. The following rules show you how to multiply and divide these integers.

### Multiplying Two Integers with the Same Sign

The result is always a positive integer when you multiply two integers with the same sign.

So when multiplying two negative integers, multiply the numbers as usual and remove the minus sign.

### Multiplying a Positive and a Negative

When you multiply two integers, and the signs are not the same, the result is always a negative integer.

### Dividing Two Integers with the Same Sign

You will always get a positive quotient when you divide two integers with the same sign.

So when dividing two negative integers, the quotient will be positive.

### Dividing a Positive and a Negative

When you divide two integers, and the signs are not the same, the result is always a negative integer.

Now that we know the rules of multiplying and dividing integers, let us learn how to use them in the following examples.