Site Tools


mathematical-maturity

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mathematical-maturity [February 06, 2026 at 15:36] yanevskivmathematical-maturity [May 14, 2026 at 11:38] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +# Mathematical Maturity
 +
 +### Trivial example
 +
 +One of the earliest awakenings of my mathematical maturity was when I was a kid, thinking one of the simplest equations there is:
 +
 +$$ a\cdot x = b$$
 +
 +I knew how to solve this 99% of the time:
 +
 +$$x = b / a$$
 +
 +Is this correct? Let's take the equation $2\cdot x = 6$:
 +
 + - Divide both sides by two $x = 6 / 2$ 
 + - The answer is $x = 3$.
 +
 +How much simpler can it get? Clearly there is not much more to it.  This works 99% of the time. No matter what two numbers I pick, it always works. The evidence is overwhelming. 
 +
 +However, threre is that pesky 1% chance of division by zero. What do we do with it? Not much of a problem if $b = 0$, since the solution $x = 0$ still works. But if $a = 0$ then we enter a truly strange land. If we take $a = 0$ and $b = 3$, no matter what choice we make for $x$ we get a nonsensical answer $0 = 3$. On the other hand, if both $a = 0$ and $b = 0$, any choice for $x$ yields $0 = 0$ which is... seemingly true. What's going on? Looks like there is a lot more structure to this equation than I thought. Let's map all the possible cases:
 +
 + - If $a\neq 0$, then $x \in\lbrace b / a\rbrace$
 + - If $a = 0$, then:
 +    - If $b = 0$, then $x \in (-\infty, +\infty)$
 +    - If $b \neq 0$, then $x\in\varnothing$
 +
 +Okay, from a simple straightforward computation we now have a decision tree. This is a bit surprising considering my goal was to find an answer to a simple equation like $a\cdot x = b$. 
 +
 +### Analogy with programming
 +
 +As a kid, I always found programming easier than mathematics. So let's translate into programming. My algorithm for solving $a\cdot x = b$ was simple, yet causing my program to crash:
 +```c
 +float solve_for_x(float a, float b)
 +{
 +    return b / a;
 +}
 +```
 +
 +To avoid the crash, the algorithm will have to be upgraded:
 +```c
 +std::set<float> solve_for_x(float a, float b)
 +{
 +    if (a != 0) {
 +        return { b / a };
 +    } else {
 +        if (b == 0) {
 +            return set::set_of_all_floats;
 +        } else {
 +            return std::empty_set;
 +        }
 +    }
 +}
 +```