KEVOS
ArticlesServicesCase studiesAboutContact
ArticlesServicesCase studiesAboutContact
← ArticlesDivisibility and PrimalityEngineering · Engineering MathematicsLesson 533/883← PrevNext →
GuidePublished 7 Aug 2026Updated 13 Aug 20269 min readBy Kevin Jogin
On this page

Ask about this page

KEVOS AIDivisibility and Primality

KEVOS knowledge first · trusted web sources when needed

Engineering  /  Mathematics  — Integer Foundations

Divisibility and Primality

Divisibility of integers, the definition of primes and composites, and the basic properties that support every later result in elementary number theory.

Page KV-MATH-0305Reading time 5 minReviewed 2026-08-07Author Kevin Jogin

Executive summary

Divisibility is the primitive relation of number theory. Everything else — congruence, factorisation, the structure of the integers modulo n — is defined in terms of it.

The definition is deceptively simple, and the properties that follow are elementary, but they are the foundation on which unique factorisation and the entire theory of the integers rests.

Learning objectives

  1. State the divisibility relation precisely and derive its basic properties.
  2. Distinguish primes, composites and units correctly, including edge cases.
  3. Explain why 1 is excluded from the primes.

01The divisibility relation

Definition

Divides

For integers a and b, we say a divides b, written a | b, if there exists an integer c with b = ac.

We then call a a divisor of b, and b a multiple of a.

Note what the definition does not require. It does not require a to be non-zero, and it does not require either number to be positive. This matters at the edges: every integer divides 0, since 0 = a · 0, while 0 divides only itself.

  • Reflexive: a | a for every a.
  • Transitive: if a | b and b | c then a | c.
  • Linear: if a | b and a | c then a | (bx + cy) for all integers x, y.
  • Bounding: if a | b and b ≠ 0 then |a| ≤ |b|.
Note
The linearity property is the workhorse. Almost every elementary divisibility proof reduces to exhibiting the quantity of interest as an integer combination of two things already known to be divisible.

02Units, primes and composites

An integer whose only divisors are ±1 and itself, up to sign, is the atomic object of the theory. Getting the definition right requires care about two exceptional cases.

Definition

Unit, prime, composite

A unit is an integer dividing 1; in Z the units are exactly ±1.

An integer n > 1 is prime if its only positive divisors are 1 and n.

An integer n > 1 that is not prime is composite; equivalently n = ab with 1 < a, b < n.

Caution
The integer 1 is a unit, not a prime. If 1 were admitted as prime, unique factorisation would fail immediately — 12 could be written as 2²·3 or 1·2²·3 or 1²·2²·3, and the theorem would need a special clause to exclude the padding. Excluding units from the primes is the cleaner convention and it generalises correctly to arbitrary rings.

The number 0 is neither prime nor composite: it is greater than no positive bound and is divisible by everything.

03Every integer above one has a prime divisor

Theorem

Existence of a prime divisor

Every integer n > 1 has at least one prime divisor.

Proof sketch. Consider the set of divisors of n exceeding 1. It is non-empty, since n belongs to it, so by well-ordering it has a least element p. If p were composite it would have a divisor strictly between 1 and p, which would also divide n and contradict minimality. So p is prime.

This is the first genuine theorem of the subject and its proof is the template for many that follow: take the least element of a non-empty set of positive integers, and derive a contradiction from the assumption that it is not atomic.

The immediate corollary — every integer greater than 1 is a product of primes — follows by induction, and is the existence half of the fundamental theorem of arithmetic. The uniqueness half is substantially harder and requires the theory of greatest common divisors.

04Euclid's theorem on the infinitude of primes

Theorem

Infinitude of primes

There are infinitely many primes.

Proof sketch. Suppose the primes were exactly p₁, ..., pₖ. Form N = p₁···pₖ + 1. Then N > 1, so it has a prime divisor p. But p is one of the listed primes, so p divides the product, and since it also divides N it divides their difference, which is 1 — impossible.

Note
This proof is often misremembered as producing a new prime by construction. It does not: N need not be prime. It shows only that N has a prime factor outside the assumed finite list, which is enough for the contradiction.

The result says nothing about how densely primes occur. That question — how many primes lie below a given bound — is the subject of the distribution of primes stream, and its answer required nineteenth-century analysis rather than Euclid's elementary argument.

05Frequently asked questions

Why does every integer divide zero?

Because 0 = a · 0 for any a, so the definition is satisfied with c = 0. This is not a degenerate special case to be patched around; it is what makes the set of multiples of a into an ideal, which is the structure that unique factorisation ultimately depends on.

Is 1 prime in any convention?

It was in some nineteenth-century treatments, and the resulting exceptions to unique factorisation are exactly why the convention was abandoned. In modern algebra the correct general statement is that primes and units are disjoint classes in any integral domain.

Does Euclid's proof give an efficient way to find new primes?

No. The number formed is astronomically large after a few steps and factoring it to extract a new prime is harder than finding primes by any other means. The proof is an existence argument, not an algorithm.

Related pages

  • Trial Division and Basic Primality Testing
  • Ideals and Greatest Common Divisors of Integers
  • Division with Remainder for Integers

Sources and method

Structural reference: Victor Shoup, A Computational Introduction to Number Theory and Algebra, Version 1, Cambridge University Press, 2005 — book pages 1-4.

This page carries the durable method layer only: definitions, constructions, algorithms, complexity results and selection criteria, authored originally for KEVOS. No text is transcribed or paraphrased from the source, and no numeric tables or benchmark data are reproduced — these are routed to live authoritative sources instead.

Author: Kevin Jogin. Last reviewed 2026-08-07.

Handbook application: from concept to controlled practice

Purpose. This expanded section turns the original page into a practical handbook. It preserves the supplied material and adds a repeatable way to apply, check and review Divisibility and Primality. It does not replace a contract, legislation, a controlled standard, competent engineering judgement or specialist advice.

The operating aim is to turn a compact mathematical statement into a usable chain of definitions, claims, examples and checks. Read the original explanation first, then use the workflow and checks below to convert knowledge into evidence.

Treat Divisibility and Primality as a network of definitions and implications, not as a list of formulas. The working vocabulary on this page—divisibility, primes, composites, primality, integers—should be made explicit before any proof or computation begins. Record the ambient set or structure, the permitted operations and the equality or equivalence relation in use. A compact theorem often changes meaning when the base field, finiteness condition, commutativity assumption or direction of an action changes.

For a proof, write the hypotheses as a checklist and mark the line at which each one is used. For a computation, state the representation of the input, the arithmetic model, the termination condition and the output invariant. For a classification problem, distinguish existence from uniqueness and distinguish an object from its representation. These separations prevent a correct local calculation from being mistaken for the general result.

A useful worked example should be small enough to inspect completely but rich enough to exercise the main mechanism. Compute the result in two ways where practical: symbolically and by substitution, structurally and numerically, or directly and through a normal form. Then include one near-miss example in which a hypothesis fails. The contrast explains why the theorem is shaped as it is and gives the reader a diagnostic pattern for later problems.

Verification is part of the mathematics. Check domains and codomains, substitute proposed solutions, test identity and zero cases, compare dimensions or cardinalities, and confirm that maps respect the required operations. In numerical work, report precision, conditioning and a residual rather than digits alone. In algorithmic work, separate mathematical correctness from implementation complexity and resource limits.

Step-by-step operating method

  1. Fix the setting. State the objects, ambient structure, notation and assumptions before manipulating symbols.
  2. Separate claims. Distinguish definitions, hypotheses, conclusions, equivalent conditions and consequences.
  3. Choose a method. Select proof, construction, calculation or algorithm according to the question actually asked.
  4. Work a small case. Use the smallest non-trivial example to expose the mechanism and test edge behaviour.
  5. Verify independently. Substitute back, check invariants, test boundary cases or use an alternative derivation.

Worked-example protocol

Illustrative method—not a source theorem. Start with a small admissible input and list the definitions it must satisfy. Carry out each transformation on a separate line, citing the property that permits it. Preserve exact values until approximation is necessary. At the end, verify the output against the original definition and one invariant such as dimension, degree, determinant, order, norm or residual. Then alter one hypothesis and observe which step ceases to be valid. This protocol creates a reusable example without inventing a theorem-specific numerical answer.

StageRecordQuality check
InputObjects, domain, notation, assumptionsEvery symbol is defined
MethodPermitted operation or cited result at each stepAll hypotheses hold
OutputExact result and representationCorrect type, domain and form
VerificationSubstitution, invariant or alternative derivationIndependent agreement
Boundary testZero, identity, degenerate or failed hypothesisScope is understood

Common failure modes and recovery actions

1. Watch for

Using a theorem without checking every hypothesis.

Recovery: Return to the governing definition or requirement and restate the decision in one sentence.

2. Watch for

Treating a suggestive example as a proof of the general case.

Recovery: Separate evidence from assumption, assign an owner and set a date for validation.

3. Watch for

Changing notation or conventions part-way through an argument.

Recovery: Run a small counterexample, boundary test, pilot or independent check before proceeding.

4. Watch for

Hiding a division-by-zero, convergence, finiteness or commutativity assumption.

Recovery: Record the consequence, decision and rationale, then update the controlled baseline.

5. Watch for

Reporting a computed result without a residual, substitution or structural check.

Recovery: Escalate when the issue affects safety, compliance, acceptance, material value or an agreed tolerance.

Review checklist

  • Can every symbol be traced to a definition or prior result?
  • Which hypothesis does each major step use?
  • Does the method cover zero, identity, degenerate and boundary cases?
  • Can the conclusion be checked by a second representation or calculation?
  • Are mandatory requirements distinguished from recommendations and illustrative values?
  • Are sources, assumptions, units, dates and versions recorded closely enough to reproduce the decision?
  • Have safety, legal, ethical, stakeholder and operational consequences been considered at the appropriate level?
  • Is there a named owner and a trigger for review, escalation, change or retirement?

Questions for deeper application

What is the most important distinction a practitioner must preserve when applying Divisibility and Primality?

Answer with a fact or cited source where available. Where evidence is incomplete, record the assumption, consequence, responsible owner and next validation action.

Which assumption about divisibility would change the result most if it proved false?

Answer with a fact or cited source where available. Where evidence is incomplete, record the assumption, consequence, responsible owner and next validation action.

What evidence would allow an independent reviewer to reproduce or challenge the conclusion?

Answer with a fact or cited source where available. Where evidence is incomplete, record the assumption, consequence, responsible owner and next validation action.

Which boundary, exception or failure case has not yet been tested?

Answer with a fact or cited source where available. Where evidence is incomplete, record the assumption, consequence, responsible owner and next validation action.

What must be handed over, monitored or reviewed after the immediate work is complete?

Answer with a fact or cited source where available. Where evidence is incomplete, record the assumption, consequence, responsible owner and next validation action.

Authoritative references and use notes

The sources below were selected as institutional or primary guidance for the broader practice. They support the handbook method; they do not imply that every statement or clause in a source applies to every project. Confirm the current edition, jurisdiction, contract and application before treating any requirement as mandatory.

  • MIT OpenCourseWare — Number Theory I — Massachusetts Institute of Technology. Used for algebraic and analytic number theory. Accessed 2026-08-13.
  • MIT OpenCourseWare — Algebra I — Massachusetts Institute of Technology. Used for groups, vector spaces, linear transformations and linear groups. Accessed 2026-08-13.

Continue learning

Learning Pathways in Computational Number TheoryGuide · Engineering MathematicsNEXT LESSON →Division with Remainder for IntegersGuide · Engineering MathematicsUseful Facts and Standard EstimatesGuide · Engineering MathematicsIdeals and Greatest Common Divisors of IntegersGuide · Engineering Mathematics
KEVOS · Engineering, manufacturing and project improvement
ArticlesServicesCase studiesAboutContact
© 2026 KEVOS®