March 20, 2026
Kuina-chan

“Kuina-chan’s Math” Lesson 3 explains integers, including negative numbers! It is assumed you have read Lesson 1.
Lesson 2 proved “1+1=2” using the axioms of sets, natural numbers, and addition. However, even without bringing up these axioms, we are convinced that “1+1=2”. So, we will stop proving things like “1\times1=1” and “1-1=0” in the manner of the previous lesson, accepting that they can be proved if one is so inclined, and from now on focus on “things we don’t really know if they hold true”.

1.Integers

In Lesson 2, we expressed natural numbers as the set “\mathbb{N}=\{0,1,2,3,4,\dots\}”, but numbers with a minus sign attached to them (except 0) are called “integers”. That is, if the set of all integers is \mathbb{Z}, then “\mathbb{Z}=\{\dots-3,-2,-1,0,1,2,3,\dots\}”.
Numbers greater than 0 are called “positive” numbers, and numbers less than 0 are called “negative” numbers. 0 is neither.
As you know, for any two integers a,b, we can perform addition “a+b”, subtraction “a-b”, and multiplication “a\timesb”. “a\timesb” is sometimes written as “a\cdotb”, or often the multiplication symbol is omitted and written as “ab”. In this article, we will write it that way from now on.

1.1Exponentiation



For an integer a and an integer b greater than or equal to 0, “a multiplied b times” is written as “a^{b}” and is called “exponentiation”. For example, “2^{3}” is “2\cdot2\cdot2”, which is 8. “10^{4}” is “1,0\cdot1,0\cdot1,0\cdot1,0”, which is 1,0000.
However, for any number a that is not 0, we define “a^{0}=1”. For example, “2^{0}=1” and “(-5)^{0}=1”.
Note

If you look at “2⁵ = 32”, “2⁴ = 16”, “2³ = 8”, “2² = 4”, “2¹ = 2”, the result is halved each time, so you can see that it is natural to think “2⁰ = 1”.

0^{0}” is sometimes defined as “1” for convenience, but for various reasons it is often left undefined.
Note

One reason why “0⁰” is usually undefined is that while looking at “3⁰ = 1”, “2⁰ = 1”, “1⁰ = 1” makes it natural to think “0⁰ = 1”, looking at “0³ = 0”, “0² = 0”, “0¹ = 0” makes it natural to think “0⁰ = 0”, leading to a contradiction.

The following laws hold for exponentiation.
Laws of Exponents
  1. a^{m}\cdota^{n}=a^{m}^{+}^{n}
  2. a^{m}/a^{n}=a^{m}^{-}^{n}
  3. (a^{m})^{n}=a^{m}^{\cdot}^{n}
  4. (a\cdotb)^{n}=a^{n}\cdotb^{n}
(1) is clear because multiplying “a\cdota\cdot\dots\cdota (m times)” and “a\cdota\cdot\dots\cdota (n times)” results in “a\cdota\cdot\dots\cdota (m+n times in total)”.
(2) involves division, which reduces the number of a’s, so the count of a becomes subtraction.
(3) means “a\cdota\cdot\dots\cdota (m times)” itself is repeated n times, resulting in “a\cdota\cdot\dots\cdota (m\cdotn times)”.
(4) means “a\cdotb\cdota\cdotb\cdot\dots\cdota\cdotb (n times each for a and b)”, so rearranging the order gives “a\cdota\cdot\dots\cdota\cdotb\cdotb\cdot\dots\cdotb (n times each for a and b)”.

1.2Absolute Value



How far an integer a is from 0 is called the “absolute value” of a, denoted as “|a|”. For example, the absolute value of 5 is “|5|=5”, and the absolute value of -3 is “|-3|=3”.
Absolute value can be thought of as “leaving positive numbers as they are, and removing the minus sign from negative numbers”.
More strictly defined, it is as follows.
Definition of Absolute Value

Verify |a| satisfies the following:

  • When a\geq0, |a|=a.
  • When a<0, |a|=-a.
For example, if a=-3, since a<0, then |a|=-a=-(-3)=3.

2.Properties of Integers

Now, let’s explain various properties of integers.

2.1Quotient and Remainder



Division of two integers (a/b) may result in a value that is not an integer. Therefore, we define “quotient” and “remainder” where the calculation results remain integers.
When performing “a/b”, the “quotient” is the number of items per person when a items are distributed among b people. The “remainder” is the number of items left over that couldn’t be distributed. For example, for “7/3”, the quotient is 2 and the remainder is 1.
“The quotient of 7/3 being 2 and remainder 1” means “when 7 items are distributed among 3 people, each gets 2 items and 1 item remains”, which can be rephrased as “there are 3 people each with 2 items, and combining those with the remaining 1 item gives 7 items”. This can be written as “2\cdot3+1=7”. In other words, “quotient q and remainder r of a/b” are defined as numbers satisfying “q\cdotb+r=a”.
Definition of Quotient and Remainder

For an integer a and a non-zero integer b, the quotient and remainder of “a/b” are defined as integers q and r which satisfy “q\cdotb+r=a and 0\leqr<|b|”.

For example, considering “8/5”, the quotient is 1 and remainder is 3. Substituting a with 8, b with 5, quotient q with 1, and remainder r with 3 into the above equation gives “1\cdot5+3=8 and 0\leq3<5”, which indeed satisfies the mathematical expression.
In the above expression, the quotient and remainder when b is 0 are undefined. That is, “3/0” etc. are undefined.

2.2Divisibility, Divisors, and Multiples



If the remainder of a/b is 0, we say “b divides a” (or a is divisible by b). For example, “4/2” has a remainder of 0, so 2 divides 4. Also, “1,2/3” has a remainder of 0, so 3 divides 1,2.
When b divides a, b is called a “divisor” of a, and a is called a “multiple” of b. For example, since 2 divides 4, 2 is a divisor of 4, and 4 is a multiple of 2.
Listing the divisors of 1,2 in ascending order gives “-1,2,-6,-4,-3,-2,-1,1,2,3,4,6,1,2”. The multiples of 2 are “\dots-6,-4,-2,0,2,4,6,\dots”, which is the set of all even numbers.
Since 1 and -1 divide all integers, multiples of 1 and -1 are all integers. All integers except 0 divide 0, so the divisors of 0 are all integers except 0.

2.3Common Divisors and Common Multiples



Now let’s consider common divisors and multiples of two or more integers.
A divisor common to both a and b is called a “common divisor” of a and b. In other words, if c divides a and c divides b, the integer c is called a “common divisor” of a and b. For example, 2 divides 4 and 2 divides 6, so 2 is one of the common divisors of 4 and 6.
A multiple common to both a and b is called a “common multiple” of a and b. In other words, if a divides c and b divides c, the integer c is called a “common multiple” of a and b. For example, 2 divides 1,0 and 5 divides 1,0, so 1,0 is one of the common multiples of 2 and 5.
For three or more numbers, common divisors and common multiples can be defined similarly.

2.4Greatest Common Divisor and Least Common Multiple



The largest of the common divisors of a and b is called the “greatest common divisor” of a and b, often denoted as “\rm{g}\rm{c}\rm{d}(a,b)”. The smallest of the positive common multiples of a and b is called the “least common multiple” of a and b, often denoted as “\rm{l}\rm{c}\rm{m}(a,b)”.
Note

gcd stands for “greatest common divisor”, and lcm stands for “least common multiple”.

For example, the divisors of 8 are “-8,-4,-2,-1,1,2,4,8”, and the divisors of 6 are “-6,-3,-2,-1,1,2,3,6”. The common divisors of 8 and 6 are the shared “-2,-1,1,2”, and the greatest common divisor is the largest among them, so \rm{g}\rm{c}\rm{d}(8,6)=2.
Also, the positive multiples of 8 are “8,16,24,32,\dots”, and the positive multiples of 6 are “6,12,18,24,30,\dots”. The positive common multiples of 8 and 6 are the shared “24,48,72,\dots”, and the least common multiple is the smallest among them, so \rm{l}\rm{c}\rm{m}(8,6)=24.
For positive integers a,b, there is a law that “a\cdotb=\rm{g}\rm{c}\rm{d}(a,b)\cdot\rm{l}\rm{c}\rm{m}(a,b)”. For example, since “\rm{g}\rm{c}\rm{d}(8,6)=2” and “\rm{l}\rm{c}\rm{m}(8,6)=24”, substituting into “a\cdotb=\rm{g}\rm{c}\rm{d}(a,b)\cdot\rm{l}\rm{c}\rm{m}(a,b)” gives “8\cdot6=2\cdot24”, resulting in “48=48”, which holds true. Using this, if you know either the greatest common divisor or the least common multiple, you can easily calculate the other.

2.5Euclidean Algorithm



Finding the greatest common divisor directly takes time, but using the “Euclidean algorithm” described below makes it faster.
Euclidean Algorithm
  1. Let a correspond to the larger of the two positive integers whose greatest common divisor is to be found, and b to the smaller one.
  2. Let r be the remainder of a/b.
  3. If r\neq0, the greatest common divisor of a and b is equal to the greatest common divisor of b and r. Thus, proceed to find the greatest common divisor of b and r and return to step (1).
  4. If r=0, the greatest common divisor of a and b is b. (Calculation finished)
For example, finding the greatest common divisor of 128 and 80 using the Euclidean algorithm is as follows.
Greatest Common Divisor of 128 and 80
  • Between 128 and 80, the larger is 128 and smaller is 80, so set a=128, b=80.
  • The remainder of a/b i.e., 128/80 is r=48, so according to “the greatest common divisor of a and b is equal to the greatest common divisor of b and r”, \rm{g}\rm{c}\rm{d}(128,80)=\rm{g}\rm{c}\rm{d}(80,48).
  • Similarly, repeating with a=80 and b=48, we get \rm{g}\rm{c}\rm{d}(80,48)=\rm{g}\rm{c}\rm{d}(48,32)=\rm{g}\rm{c}\rm{d}(32,16).
  • Here, the remainder of 32/16 is r=0, so from \rm{g}\rm{c}\rm{d}(a,b)=b, we have \rm{g}\rm{c}\rm{d}(32,16)=16.
  • Therefore, \rm{g}\rm{c}\rm{d}(128,80)=16.
Generally, repeating division is easier than listing common divisors, making this method convenient.

3.Prime Numbers

An integer p greater than or equal to 2 whose positive divisors are only 1 and p is called a “prime number”. For example, 5 is a prime number because its positive divisors are only 1 and 5. 4 is not a prime number because it has 2 as a divisor in addition to 1 and 4.
In other words, a prime number is an integer greater than or equal to 2 that “cannot be divided by any positive integer other than ‘1 and itself’”. Integers greater than or equal to 2 that are not prime numbers are called “composite numbers”.
Listing prime numbers in ascending order gives “2,3,5,7,11,13,17,19,23,29,\dots”. There are infinitely many prime numbers. The appearance of prime numbers seems irregular, and research to capture their rules has continued from ancient times to the present.
Prime numbers can be obtained using a method called the “Sieve of Eratosthenes”. This method uses the fact that “among integers greater than or equal to 2, those that are not multiples of other prime numbers are prime numbers”, and is performed as follows.
Sieve of Eratosthenes
Sieve of Eratosthenes

3.1Prime Factorization



All positive integers can be expressed as a product of prime numbers. For example, “4=2\cdot2”, “6=2\cdot3”, “50=2\cdot5\cdot5”, etc. Expressing a positive integer as a product of prime numbers in this way is called “prime factorization”.
Each prime number that appears when prime factorized is called a “prime factor”. For example, since “10=2\cdot5”, the prime factors of 10 are 2 and 5.
Any positive integer can always be prime factorized, and the pattern is limited to one way if the order of multiplication is ignored. For example, using exponentiation, “1=2^{0}3^{0}5^{0}\dots”, “2=2^{1}3^{0}5^{0}\dots”, “3=2^{0}3^{1}5^{0}\dots”, “4=2^{2}3^{0}5^{0}\dots”, “5=2^{0}3^{0}5^{1}\dots”, “6=2^{1}3^{1}5^{0}\dots”. This property is called the “Unique Factorization Theorem” (or uniqueness of prime factorization) and is useful for proving other theorems.
The reason 1 is not included in prime numbers is that if 1 were included, “2=1^{0}2^{1}\dots=1^{1}2^{1}\dots=1^{2}2^{1}\dots=1^{3}2^{1}\dots”, and the uniqueness of prime factorization would no longer hold.

3.2Coprime



When two integers a and b have no common divisors other than 1 and -1, that is, when \rm{g}\rm{c}\rm{d}(a,b)=1, a and b are said to be “coprime” (or relatively prime). For example, since \rm{g}\rm{c}\rm{d}(9,20)=1, 9 and 20 are coprime.
Saying that positive integers a and b are “coprime” is equivalent to saying that a and b have “no common prime factors”. For example, from 9=3\cdot3 and 20=2\cdot2\cdot5, 9 and 20 do not contain common prime factors, so they can be said to be coprime.

4.Modular Arithmetic

Now, returning to the topic of remainders in division, “the remainder when 5 is divided by 3 is 2”, and “the remainder when 8 is divided by 3 is also 2”, so they match. This can be said as “in the world of remainders when integers are divided by 3, 5=8 holds true”. When the remainders divided by 3 match in this way, we say “5 and 8 are congruent modulo 3” and write “5\equiv8 (\rm{m}\rm{o}\rm{d} 3)”.
Generally, for a positive integer m, when the remainders of a/m and b/m match, we say “a and b are congruent modulo m” and write “a\equivb (\rm{m}\rm{o}\rm{d} m)”. When they do not match, we write “a\not\equivb (\rm{m}\rm{o}\rm{d} m)”. An expression written this way is called a “congruence equation” (or modular arithmetic).
For example, “the remainder of 3 divided by 2” is the same as “the remainder of 1 divided by 2”, so “3\equiv1 (\rm{m}\rm{o}\rm{d} 2)”. On the other hand, “the remainder of 5 divided by 4” is different from “the remainder of 6 divided by 4”, so “5\not\equiv6 (\rm{m}\rm{o}\rm{d} 4)”.
Congruence equations have the property that they hold even if the same number is added, subtracted, or multiplied to both sides.
Properties of Congruence

For any integers a,b,m, if a\equivb (\rm{m}\rm{o}\rm{d} m) holds, then the following (1) to (3) hold.

  1. For any integer n, a+n\equivb+n (\rm{m}\rm{o}\rm{d} m).
  2. For any integer n, a-n\equivb-n (\rm{m}\rm{o}\rm{d} m).
  3. For any integer n, a\cdotn\equivb\cdotn (\rm{m}\rm{o}\rm{d} m).
For example, since “5\equiv8 (\rm{m}\rm{o}\rm{d} 3)” holds, multiplying both sides by 100 gives “500\equiv800 (\rm{m}\rm{o}\rm{d} 3)”, which also holds.

5.Diophantine Equations

Finally, let’s challenge a specific problem applying the properties of integers introduced so far. It is a problem called “Diophantine equation”.
An “equation” is a problem to find the value of a variable that satisfies an equality, such as “Find x satisfying 4x=8”. The value of the variable for which the equality holds is called the “solution” of the equation.
Among equations, “Diophantine equations” refer to those where the equation has infinitely many solutions (over real numbers, but typically integer solutions are sought). For example, “Find the combination of x and y satisfying x+2y=3”. In this case, “x=3,y=0” and “x=1,y=1” are solutions.
In this way, Diophantine equations often have infinitely many solutions, but by adding conditions, the number of solutions can become finite. Let’s look at a problem that can be solved like a puzzle by using such conditions.

5.1Problem



Let’s challenge the following specific Diophantine equation problem.
Diophantine Equation Problem
Problem

Let “reversing” 1,234 mean making it 4,321. At this time, when a certain 4-digit integer N is reversed, it becomes 4 times the original number N. Find the value of N.

5.2Solution Method



First, let’s construct the Diophantine equation. Let the 4-digit integer N have digits a, b, c, d from the top. For example, if N=1,234, then a=1, b=2, c=3, d=4. Then N can be expressed as 1,000a+100b+10c+d.
Since reversing it results in 4 times the original number, the following equation is formed.
Diophantine Equation

4\cdot(1,000a+100b+10c+d)=1,000d+100c+10b+a

The left side is 4 times N, and the right side is the reversed number.
As it is, this expression contains 4 variables and is a Diophantine equation with potentially many solutions, so let’s narrow down the solutions using various conditions.

5.3Finding the value of a



First, if a=0, N would be 3 digits or less, so it must be a>0. Also, if a\geq3, multiplying by 4 would result in 5 digits or more, so it must be a<3. That is, a is either 1 or 2.
Here, if we assume a=1, the equation becomes “4\cdot(1,000+100b+10c+d)=1,000d+100c+10b+1”, and the ones digit on the right side is “1”. The left side is an integer multiplied by 4, but there is no integer that becomes 1 in the ones digit when multiplied by 4 (it must be even), so the left and right sides never match. In other words, it is clear that no solution exists when a=1. Therefore, if a solution exists, it is only when a=2.

5.4Finding the value of d



Substituting a=2, the equation becomes “4\cdot(2,000+100b+10c+d)=1,000d+100c+10b+2”. Here, the ones digit on the right side is “2”. The ones digit of an integer multiplied by 4 becoming 2 only happens for “3\cdot4=12” and “8\cdot4=32”, so d, which is the ones digit of N, is either 3 or 8.
If d=3, the equation is “4\cdot(2,000+100b+10c+3)=3,000+100c+10b+2”, but organizing this gives “b=(6c-501)/39”. Substituting any value from 0 to 9 into c results in b being a negative number, so d\neq3. Therefore, if a solution exists, it is only when d=8.

5.5Finding the values of b and c



Substituting d=8, the equation becomes “4\cdot(2,000+100b+10c+8)=8,000+100c+10b+2”. Transforming this gives “b=(2c-1)/13”. For “(2c-1)/13” to be an integer, trying values from 0 to 9 for c shows that c=7 is the only solution.
Substituting c=7 into b=(2c-1)/13, we get b=(2\cdot7-1)/13, so b=1.
Therefore, from a=2, b=1, c=7, d=8, we get N=2,178. Calculating 2,178\cdot4 gives 8,712, confirming that “multiplying by 4 results in the reverse order of the original number”.
In this lesson, we introduced basic properties of integers. Next time, we will explain “real numbers” and “functions” and “mappings”, which are important for handling these numbers!
1773993171en