The Reality Equation / John Rector
How to Derive Surprise from the Reality Equation
The house key has changed hands. What does the father’s empty pocket have to do with a logarithm?

The father reaches for his key on the way out. His fingers meet the lining of his pocket. He can tell you exactly where the key is. He handed it to his daughter a minute ago. Yet for an instant his attention is there, in the empty pocket, while she is asking where the water shutoff is.
That instant is why I want to derive Surprise. The Reality Equation gives us a succession of comparisons between what happens and the Expectation already in place. I want to know how those comparisons can add up to something that claims a person’s attention. To get there I need a quantity that gives an exact match a value of zero, lets opposing departures cancel, and carries forward the direction we found in the quotient.
From three given numbers to Surprise
Use the same classroom values as the house-key lesson. Let A = 4 be Actual, P = 4 be the real predictive component of Expectation, and I = 3 be the ideational coordinate. Capital I is the given number 3. Lowercase i is the imaginary unit, with i² = −1. We can now calculate every remaining quantity.
1. Build Expectation
E = P + iI
E = 4 + i(3)
E = 4 + 3i
The prediction of 4 agrees exactly with the Actual of 4. The denominator still has an imaginary component of 3.
2. Divide Actual by Expectation
R = A / E
R = 4 / (4 + 3i)
Multiply the numerator and denominator by the complex conjugate, 4 − 3i. We have multiplied the fraction by one, so its value stays the same.
R = [4(4 − 3i)] / [(4 + 3i)(4 − 3i)]
On top, distribute the 4. On the bottom, the two cross terms cancel and i² = −1 turns the last term positive.
4(4 − 3i) = 16 − 12i
(4 + 3i)(4 − 3i) = 16 − 9i² = 25
Divide the two coordinates of the numerator by 25.
R = 16/25 − (12/25)i
R = 0.64 − 0.48i
3. Calculate the magnitude of R
For a point a + bi, its distance from zero is √(a² + b²). Our horizontal coordinate is 0.64 and our vertical coordinate is −0.48. Square both before adding.
r = |R|
r = √(0.64² + (−0.48)²)
r = √(0.4096 + 0.2304)
r = √0.64 = 0.8
4. Calculate the angle of R
Set the calculator to radians. The point lies to the right of zero and below the horizontal axis, so its principal angle is negative. With atan2, enter the vertical coordinate first. In this quadrant, ordinary arctangent of the slope gives the same answer.
θ = atan2(−0.48, 0.64)
θ = arctan(−0.48 / 0.64)
θ = arctan(−0.75) ≈ −0.6435
We now have the same R written in polar form, R = r eiθ. The radius is 0.8 and the clockwise turn is about 0.6435 radians.
5. Derive the logarithm formula
Writing S = ln(R) asks which exponent on e gives us R. Call the unknown exponent x + iy. Write e raised to that exponent in polar form and compare it with the R we just calculated.
eS = R
ex + iy = r eiθ
ex eiy = r eiθ
Since eiy has length one, the entire length on the left comes from ex. Matching lengths gives ex = r, hence x = ln(r). Matching directions gives y = θ when we use the principal angle. Put these coordinates back into S = x + iy.
S = ln(r) + iθ
6. Substitute and calculate Surprise
S = ln(0.8) + i arctan(−0.75)
ln(0.8) ≈ −0.2231
arctan(−0.75) ≈ −0.6435
S ≈ −0.2231 − 0.6435i
Read that answer one coordinate at a time. The −0.2231 records a contraction in scale. Actual was four-fifths the length of Expectation. The −0.6435 records the quotient’s clockwise orientation in radians. Taking only ln(0.8) would give the first coordinate and lose the second.
Check the answer by exponentiating
Use the unrounded numbers x = ln(0.8) and θ = arctan(−0.75). Because our triangle has sides in the ratio 3 to 4 to 5 and lies below the axis, cos θ = 4/5 and sin θ = −3/5. Euler’s formula gives the original quotient exactly.
eS = ex(cos θ + i sin θ)
= 0.8(0.8 − 0.6i)
= 0.64 − 0.48i = R
For any nonzero R, the principal-value formula is Log(R) = ln|R| + i Arg(R). The capital L marks the choice of angle between −π and π, including π and excluding −π. A whole revolution adds 2π radians and leaves the point in the same place, so all other logarithm values differ from the principal one by an integer multiple of 2πi. Across time we can follow the turns continuously so crossing the angle boundary does not introduce a false jump.
Why take a logarithm?
Start with ordinary positive numbers. Imagine looking at a photograph of the key. Enlarge the photograph by a factor of two, then enlarge it again by a factor of two. The final image is four times the original size. If you recorded the two adjustments separately, you would count two equal steps. If someone handed you just the original image and the final one, you would want to recover the same total.
Call the reading of a scale change f. Then f(2) + f(2) must equal f(4). Shrink the enlarged image back by half and that adjustment must undo one doubling. So f(½) must equal −f(2). And an untouched image gives f(1) = 0. The general requirement is f(ab) = f(a) + f(b) for positive scale factors. Every continuous reading with that property is a constant times a logarithm. The constant chooses the unit. I use the natural logarithm, ln, which gives ln(2) ≈ 0.693 and ln(½) ≈ −0.693.
The same operation is built into a slide rule. Distances along its scales represent logarithms. Slide one distance beside another and the instrument adds the distances while its markings display the product. That is the operation I want to perform on the scale of Reality. Step 5 shows how the complex logarithm keeps the angle alongside that scale reading.
Try the other side of the diagram
Use the reflected point from the first lesson, R = 0.64 + 0.48i. Before calculating, decide which coordinate of Surprise must change.
Check the result
The length is still 0.8. The turn is now counterclockwise. The principal value is S ≈ −0.2231 + 0.6435i. Between the two examples the entire difference survives in the angle. The two points illustrate how the same handoff can be experienced with different orientations.
Where Claude Shannon comes in
Claude Shannon built his theory of communication around a closely related question. How much information arrives when one of several possible messages actually arrives? Here is a way to remember the name. One account from inside Anthropic says its AI assistant, Claude, was named in tribute to Claude Shannon.
Suppose a switch is equally likely to be open or closed. Learning its position gives you one bit. Learn the positions of two independent switches and you have learned two bits. The probability of any one specified pair is ¼. The probabilities multiply while the information adds. For an outcome with probability p, its information is −log₂(p) bits. The natural-log version is −ln(p) nats. Averaging those individual information values over the possible outcomes gives Shannon entropy.
You can see exactly where the two calculations meet. If R = 1/p, then ln(R) = −ln(p). An event with probability ¼ gives ln(4) nats, or two bits. At the kitchen table, however, 0.8 is a ratio of magnitudes. Treating it as a probability would reverse the sign of our calculation and discard the angle. Shannon gives us the reason a logarithm belongs in a measure of information. My equation supplies a different input when the question is how a person experiences an Actual.
What reaches attention?
Imagine two successive comparisons in a single person, weighted equally. If each produces −0.2231 − 0.6435i, their average preserves the whole signal. If the second instead produces −0.2231 + 0.6435i, the angular parts cancel and the average is −0.2231. Each instant had the same amount of angular departure. Their persistence differed. We could never discover that difference from a list of magnitudes alone.
In my model, the human system accumulates Surprise over a short window, weighting its successive values, then compresses the result into the finite range of conscious attention. The father feels the lining of his pocket. He doesn’t feel a phase angle or perform a calculation. The derivation is for us. It lets us ask what could endure across those instants long enough for the empty pocket to interrupt his daughter’s question.