Search Knowledge

© 2026 LIBREUNI PROJECT

Number Systems and Arithmetic

Number Systems and Arithmetic

The study of mathematics begins with numbers. We build complex systems from simple foundations, starting with the natural numbers.

The Hierarchy of Numbers

  1. Natural Numbers (N\mathbb{N}): {0,1,2,3,}\{0, 1, 2, 3, \dots\} (counting numbers).
  2. Integers (Z\mathbb{Z}): {,2,1,0,1,2,}\{\dots, -2, -1, 0, 1, 2, \dots\}.
  3. Rational Numbers (Q\mathbb{Q}): Fractions p/qp/q where p,qZp, q \in \mathbb{Z} and q0q \neq 0.
  4. Real Numbers (R\mathbb{R}): Includes irrational numbers like 2\sqrt{2} and π\pi.
  5. Complex Numbers (C\mathbb{C}): Numbers of the form a+bia + bi.
python
1import numpy as np
2 
3def classify_number(n):
4 if isinstance(n, complex):
5 return "Complex"
6 if n % 1 == 0:
7 return "Integer/Natural"
8 return "Fractional/Real"
9 
10test_cases = [42, 3.1415, complex(1, 2)]
11for n in test_cases:
12 print(f"{n} is {classify_number(n)}")

Peano Axioms

The natural numbers are rigorously defined by the Peano axioms, which use a single constant 00 and a successor function S(n)S(n).

  • 00 is a natural number.
  • For every nn, S(n)S(n) is a natural number.
  • No two numbers have the same successor.
  • 00 is not the successor of any number.

Fundamental Theorem of Arithmetic

Every integer greater than 1 either is a prime number itself or can be represented as a unique product of prime numbers.

python
1def prime_factors(n):
2 i = 2
3 factors = []
4 while i * i <= n:
5 if n % i:
6 i += 1
7 else:
8 n //= i
9 factors.append(i)
10 if n > 1:
11 factors.append(n)
12 return factors
13 
14print(f"Factors of 12: {prime_factors(12)}")
15print(f"Factors of 37: {prime_factors(37)}")

Which set of numbers is defined as the set of all possible ratios of integers?

What is the only even prime number?

Previous Module Number Theory