Irrational numbers — AQA A-Level Computer Science
An irrational number is a real number that cannot be written as a ratio of two integers, possessing an infinite and non-repeating expansion. In AQA A-Level Computer Science, understanding irrational numbers is essential for appreciating the fundamental limitations of representing continuous real-world quantities in finite binary systems.
Irrational numbers explained
An irrational number is a real number that cannot be written as a fraction p/q where p and q are integers and q is not zero.
Read the full explanation
Its decimal expansion is non-terminating and non-recurring, which is the practical way to recognise one. Familiarity with the concept means knowing this defining property and being able to contrast irrationals with rationals, which are the numbers that can be expressed as such a fraction. Common examples include √2, π and e, and students should be able to recognise a square root of a non-square integer as irrational. The concept sits within the real numbers, so the real numbers divide into rational and irrational numbers with no overlap. Being familiar with the concept also involves recognising that an irrational number cannot be exactly represented by a finite decimal, which is why calculators give only approximations.
Your focus
- Be familiar with the concept of an irrational
Which command word is this?
Provide the concise definition or identify the specific number set without prolonged explanation or working.
Irrational numbers exam tips
Topic Overview
The study of irrational numbers in AQA A-Level Computer Science sits within the number systems topic alongside natural (N), integer (Z), rational (Q), and real (R) numbers. An irrational number is defined as a real number that cannot be expressed as a quotient of two integers, possessing an infinite and non-periodic sequence of digits.
Understanding irrational numbers provides foundational insight into why digital computers cannot achieve absolute precision for continuous mathematical concepts. Because computer memory is strictly finite, irrational constants such as pi or square roots must be approximated using fixed-point or floating-point encodings, introducing inevitable rounding and truncation errors.
Key Concepts
- →Formal definition: An irrational number is any real number that cannot be written in the form a/b, where a and b are integers and b != 0.
- →Set hierarchy: Irrational numbers belong to the set of real numbers (R) but are strictly excluded from the set of rational numbers (Q).
- →Infinite non-repeating representation: Unlike rational numbers, which either terminate or repeat periodically, irrational numbers never terminate or repeat in any integer base.
- →Representation error: Because digital computers use finite bit-lengths, irrational numbers cannot be stored exactly in standard binary formats, necessitating approximations.
Marking Points
- States that an irrational number cannot be written as p/q with p and q integers and q non-zero
- Identifies that the decimal expansion of an irrational number is non-terminating and non-recurring
- Gives standard examples such as √2, π and e
- Recognises that the set of irrational numbers and the set of rational numbers together form the real numbers without overlap
- Explains that an irrational number has no exact finite decimal representation, so decimal approximations are used in practice
Examiner Tips
- 💡Use the definition of rational as the reference point: an irrational number is simply one that fails it
- 💡Check a square root by asking whether the number inside is a perfect square before classifying it
- 💡In multiple-choice questions, look for options that name a non-terminating, non-recurring decimal rather than a decimal with many digits
- 💡Memorise the standard set notation symbols: N (natural), Z (integers), Q (rational), and R (real), and practice placing values correctly into Venn diagrams.
- 💡When explaining why an irrational number causes issues in computer programs, always mention 'finite bit allocation' and 'rounding/truncation error'.
Common Mistakes
- Describes an irrational number as one with a decimal point; correct by stating the key feature is a non-terminating, non-recurring decimal
- Assumes any square root is irrational; correct by noting √4 = 2 is rational because 4 is a perfect square
- Confuses irrational with imaginary numbers; correct by stating irrationals are real numbers that cannot be written as a fraction of integers
- Believing that any number with an infinite binary expansion is irrational. In reality, rational values like 1/10 or 1/3 have infinite recurring binary representations, but they remain strictly rational.
- Assuming that increasing floating-point precision to 64-bit or 128-bit will eventually allow an irrational number to be stored completely accurately, forgetting that irrational numbers require infinite bits.
- Confusing the set of real numbers R with irrational numbers. Real numbers encompass both rational and irrational numbers.
Revision Plan
- 1Day 1: Learn formal mathematical definitions for N, Z, Q, and R, specifically practicing the algebraic definition of Q and non-Q.
- 2Day 2: Compare recurring rational numbers in binary with genuine irrational numbers to understand the distinction.
- 3Day 3: Practice AQA past paper questions on number set classification and error propagation.
- 4Day 4: Review floating-point limitations and explain why equality checks fail on approximated irrational numbers.
Exam Question Types
- 📋Set classification questions: Assigning given numbers (e.g. -4, 0, 2/3, sqrt(3), pi) to the correct sets N, Z, Q, or R.
- 📋Short explain questions: Defining an irrational number using exact mathematical terminology.
- 📋Applied limitation questions: Explaining the impact of approximating irrational numbers in simulation software or games development.
Command Word Expectations (AQA)
Provide the concise definition or identify the specific number set without prolonged explanation or working.
Set out the mathematical or technical reasons clearly, connecting the properties of irrational numbers to binary representation limitations.
Highlight the precise mathematical boundaries that separate two sets, explicitly contrasting their ability to be expressed as a quotient of integers.
How Students Lose Marks (Examiner Pitfalls)
Step-by-Step Worked Solutions
Question: A graphics engine requires precise coordinate calculations using the circle constant pi. Explain why pi is classified as an irrational number, and explain the consequences of storing pi within a standard 32-bit floating-point variable.
- 1.Step 1: State the definition of an irrational number in relation to pi. Pi cannot be expressed as a ratio of two integers (a/b where a, b in Z and b != 0) and has an infinite, non-repeating decimal expansion.
- 2.Step 2: Relate this property to finite computer architecture. A 32-bit floating-point variable (such as IEEE 754 single precision) allocates a fixed number of bits (23 bits) to the mantissa/significand, meaning it can only represent a finite subset of rational numbers.
- 3.Step 3: Detail the consequences of this representation limit. Storing pi requires truncation or rounding to the nearest representable binary value. Over repeated geometric transformations, these rounding errors compound, potentially leading to visual artifacts or drift in object coordinates.
Question: Place the following numbers into their most restrictive set within the hierarchy N, Z, Q, and R: -7, 3/4, sqrt(5), 12. Then state which of these numbers cannot be represented without rounding error in any standard binary fixed-point format.
- 1.Step 1: Classify each number into its most specific set. 12 is a natural number (N). -7 is an integer (Z). 3/4 is a rational number (Q). sqrt(5) cannot be expressed as a fraction of integers, so its most restrictive set is the real numbers (R) as an irrational number.
- 2.Step 2: Determine binary fixed-point representation limits. Any irrational number has an infinite, non-repeating binary representation and can never be represented completely accurately in finite bits.
- 3.Step 3: Identify whether any rational numbers also suffer rounding errors. 3/4 equals binary 0.11 exactly. However, sqrt(5) cannot be represented without rounding error in any fixed-point format of finite bit-width.