A secret-number trick looks like mind reading, but it is really algebra.
The user chooses a starting number, follows a list of operations, and reports only the final result.
The calculator then reverses the algebra to recover the original number.
1. The secret number as a variable
Let the secret number be \(x\). The trick applies a sequence of operations to \(x\) and produces a final result \(y\).
\[
\begin{aligned}
x
\quad\longrightarrow\quad
\text{mental operations}
\quad\longrightarrow\quad
y.
\end{aligned}
\]
Even though the calculator does not know \(x\) at first, it knows the operations. Therefore, it can write the relationship between \(x\) and \(y\).
2. Identity tricks
Some tricks are built so that every operation eventually cancels out.
For example:
- Think of a number \(x\).
- Multiply by \(a\).
- Add \(ad\).
- Divide by \(a\).
- Subtract \(d\).
The algebra is:
\[
\begin{aligned}
x
&\to ax,\\
ax
&\to ax+ad,\\
ax+ad
&\to \frac{ax+ad}{a}=x+d,\\
x+d
&\to x.
\end{aligned}
\]
The final result is exactly the original number:
\[
\begin{aligned}
y&=x.
\end{aligned}
\]
In this type of trick, when the user enters the final result, the final result is already the secret number.
3. Linear tricks
Other tricks scramble the number into a linear expression:
\[
\begin{aligned}
y&=kx+m.
\end{aligned}
\]
Here, \(k\) and \(m\) are fixed constants determined by the trick.
The important condition is:
\[
\begin{aligned}
k&\ne0.
\end{aligned}
\]
If \(k\ne0\), the rule can be reversed.
4. Inverse formula
Starting from
\[
\begin{aligned}
y&=kx+m,
\end{aligned}
\]
subtract \(m\) from both sides:
\[
\begin{aligned}
y-m&=kx.
\end{aligned}
\]
Then divide by \(k\):
\[
\begin{aligned}
x&=\frac{y-m}{k}.
\end{aligned}
\]
This is the reveal formula used by the calculator.
5. Worked example: identity cancellation
Suppose the trick says:
- Think of a number.
- Multiply by \(4\).
- Add \(20\).
- Divide by \(4\).
- Subtract \(5\).
The algebra is:
\[
\begin{aligned}
A&=4x,\\
B&=A+20=4x+20,\\
C&=\frac{B}{4}=x+5,\\
y&=C-5=x.
\end{aligned}
\]
So the final result is the original secret number.
6. Worked example: linear scramble
Suppose the trick says:
- Think of a number.
- Multiply by \(3\).
- Add \(7\).
- Multiply by \(2\).
- Subtract \(5\).
The algebra is:
\[
\begin{aligned}
A&=3x,\\
B&=A+7=3x+7,\\
C&=2B=6x+14,\\
y&=C-5=6x+9.
\end{aligned}
\]
Therefore:
\[
\begin{aligned}
y&=6x+9.
\end{aligned}
\]
To recover \(x\), use the inverse formula:
\[
\begin{aligned}
x&=\frac{y-9}{6}.
\end{aligned}
\]
If the final result is \(51\), then:
\[
\begin{aligned}
x&=\frac{51-9}{6}\\
&=\frac{42}{6}\\
&=7.
\end{aligned}
\]
So the secret number was \(7\).
7. Two-path tricks
A two-path trick asks the user to remember an intermediate result, then return to the original number.
For example:
\[
\begin{aligned}
A&=2x+u,\\
B&=3x-v.
\end{aligned}
\]
If the trick then adds the two paths and divides by \(5\), the final result is:
\[
\begin{aligned}
y
&=\frac{A+B}{5}\\
&=\frac{2x+u+3x-v}{5}\\
&=x+\frac{u-v}{5}.
\end{aligned}
\]
The result is still linear, so it can still be reversed.
8. Why the calculator can reveal decimals and negative numbers
The algebra does not depend on \(x\) being positive or whole.
If the operations are valid, the same formula works for any real number:
\[
\begin{aligned}
x\in\mathbb{R}.
\end{aligned}
\]
This is why the calculator can reveal negative numbers, zero, fractions, and decimals.
9. Connection with functions
A trick can be viewed as a function:
\[
\begin{aligned}
f(x)&=kx+m.
\end{aligned}
\]
The final result is:
\[
\begin{aligned}
y&=f(x).
\end{aligned}
\]
The calculator applies the inverse function:
\[
\begin{aligned}
f^{-1}(y)&=\frac{y-m}{k}.
\end{aligned}
\]
That inverse function is the “secret-number finder.”
10. Formula summary
The table below uses plain text formulas in cells to avoid raw LaTeX rendering problems.
11. Common mistakes
- Typing the original secret number instead of the final result.
- Skipping a mental step or doing the operations in the wrong order.
- Rounding too early when the secret or final result is a decimal.
- Forgetting that subtraction and division are order-sensitive.
- Thinking the calculator is guessing randomly; it is solving a linear equation.
Key idea: the trick is not magic. It is a reversible equation disguised as a game.