The One Detail That Makes √2 Irrational (and Interviewers Love It)

bugfree.ai is an advanced AI-powered platform designed to help software engineers master system design and behavioral interviews. Whether you’re preparing for your first interview or aiming to elevate your skills, bugfree.ai provides a robust toolkit tailored to your needs. Key Features:
150+ system design questions: Master challenges across all difficulty levels and problem types, including 30+ object-oriented design and 20+ machine learning design problems. Targeted practice: Sharpen your skills with focused exercises tailored to real-world interview scenarios. In-depth feedback: Get instant, detailed evaluations to refine your approach and level up your solutions. Expert guidance: Dive deep into walkthroughs of all system design solutions like design Twitter, TinyURL, and task schedulers. Learning materials: Access comprehensive guides, cheat sheets, and tutorials to deepen your understanding of system design concepts, from beginner to advanced. AI-powered mock interview: Practice in a realistic interview setting with AI-driven feedback to identify your strengths and areas for improvement.
bugfree.ai goes beyond traditional interview prep tools by combining a vast question library, detailed feedback, and interactive AI simulations. It’s the perfect platform to build confidence, hone your skills, and stand out in today’s competitive job market. Suitable for:
New graduates looking to crack their first system design interview. Experienced engineers seeking advanced practice and fine-tuning of skills. Career changers transitioning into technical roles with a need for structured learning and preparation.
{width="600"}
The decisive move in the classic √2 proof isn't just “use contradiction” — it's the requirement that the fraction is in lowest terms. That's what closes the argument.
Here's the proof, laid out to show exactly where that single constraint matters.
Assume √2 is rational. Then we can write a/b = √2 where a and b are integers and, crucially, a/b is in lowest terms (a and b share no common factor).
Square both sides: a²/b² = 2 ⇒ a² = 2b².
From a² = 2b² we see a² is even, so a must be even. (If a were odd, a² would be odd.)
Write a = 2k for some integer k and substitute back: (2k)² = 2b² ⇒ 4k² = 2b² ⇒ b² = 2k².
Now b² is even, so b is even. Therefore both a and b are divisible by 2.
That contradicts the original assumption that a/b was in lowest terms (no common factors). The contradiction means the assumption that √2 is rational is false. Hence √2 is irrational.
Why this matters: the algebraic manipulations produce the parity conclusions (a and b are even). Without the explicit “lowest-terms” constraint, you wouldn't have a contradiction — you would only conclude that the fraction can be simplified further. The contradiction arises because we forbade any common factor at the start.
Why interviewers like this proof
- It shows clear logical structure: an assumption, deduction, and a pinpointed contradiction.
- It tests attention to hidden but crucial assumptions (like "in lowest terms").
- It demonstrates fluency with basic number theory ideas (parity, divisibility) and proof techniques (proof by contradiction).
Quick generalization
The same pattern proves √p is irrational for any prime p: assume a/b in lowest terms with a² = p b². Then p divides a, write a = p k, substitute, and conclude p divides b too — contradicting lowest terms.
Takeaway
The “lowest-terms” requirement is the single detail that turns routine algebra into a contradiction. Recognizing and using such constraints is exactly why this proof is a favorite in interviews and teaching: it rewards careful assumptions and clean reasoning.

