Visual walkthrough — Sign convention for mirrors and lenses
Step 1 — Lay down the axis and choose which way is "positive"
WHAT. Before any physics, we draw a single horizontal line and put a mirror at one end. Light will come in from the left. We declare left→right to be the positive direction of measurement.
WHY. A distance is meaningless until you say "measured from where, in which direction." Optics has many distances (, , , ) and they only add up correctly if they all share one ruler. That shared ruler is the principal axis, and its positive tip points the way the light is travelling. This single choice is what makes one equation replace a dozen special cases — see the parent's "why bother" argument.
PICTURE. The white horizontal line is the principal axis. The point where it meets the mirror is the pole — our origin, the "" of the ruler. The amber arrow shows incident light going left→right, i.e. the direction.

Step 2 — Place the object and name its distance
WHAT. We stand an upright arrow (the object, height ) on the axis to the left of the mirror. The distance from the pole to the object's foot we call .
WHY. is not "how far away" as a raw length — it is a coordinate on our ruler. The object sits to the left of , which is against the incident-light direction we chose in Step 1. By the rule "against light negative," a real object always gives a negative coordinate. We write , where is the plain positive length you'd read off a tape measure.
PICTURE. The cyan arrow of height is the object. The white bracket from leftward is the length . The label reminds you: the coordinate is , the length is .

Step 3 — Send in two rays and let them build the image
WHAT. We draw two special rays leaving the tip of the object:
- a ray parallel to the axis, which after reflecting must pass through the focus ;
- a ray through the centre , which hits the mirror head-on and bounces straight back. Where the two reflected rays cross is the tip of the image, an arrow of height at distance from .
WHY. Two rays are enough to locate a point: one point needs two lines to cross. We pick these two because their behaviour is known — parallel-through-focus is the definition of the focus, and through- hits the sphere along a radius (perpendicular to the surface) so it retraces itself. No calculus yet; just "where do two known lines meet."
PICTURE. The two amber rays leave the object tip, reflect, and cross on the left, forming the inverted cyan image of height . Its foot is a length from ; since the image also lands on the left (against light), its coordinate is .

Step 4 — Find the two similar triangles (the heart of it)
WHAT. Look at where each parallel incident ray touches the mirror near the pole. That reflected ray goes to the tip of the image and through the focus . This creates two triangles that share the same angles — they are similar — so their side-ratios are equal.
WHY similar triangles and not something fancier? We need a relation between , , and the focal length . Similar triangles are the simplest tool that converts "these angles are equal" into "these ratios are equal." We are working in the paraxial approximation: all rays stay close to the axis, all angles are tiny, so the curved mirror behaves like a flat vertical line through and the little heights and lengths line up cleanly.
PICTURE. Two shaded triangles share the vertex at . The tall one has the object height over length ; the short one has the image height over length ... but the cleaner pair is the one below. Watch the two matching angle-ticks.

The two similar triangles (object-side vs image-side, both meeting at ) give, in plain positive lengths:
Step 5 — Combine the ratios into a magnitude equation
WHAT. Set the two expressions for equal and simplify.
WHY. Both equal the same thing (), so they equal each other. This eliminates the heights and leaves only distances , , — exactly the relation we're hunting.
Cross-multiply (), expand (), and divide every term by :
PICTURE. The algebra visualised: three reciprocal "slices" , , shown as bars whose lengths satisfy the sum. This is the magnitude mirror formula — true numbers, no signs yet.

Step 6 — Promote lengths to signed coordinates
WHAT. Replace each plain length by its signed coordinate from Steps 2–3. For this concave-mirror-with-real-image picture: object left ⇒ ; image left ⇒ ; concave focus left ⇒ .
WHY. The magnitude formula only works for this one picture. We want a single equation that survives when the image flips behind the mirror, or the mirror becomes convex. The trick: express everything in coordinates that already carry the sign, so the geometry never has to be redrawn.
Start from the magnitude relation and multiply through by :
Now substitute , , , i.e. etc.:
PICTURE. The same diagram, now with a signed ruler underneath: everything left of reads negative, everything right reads positive. Each length label is crossed out and replaced by .

Step 7 — Test every case: does one equation really cover them all?
WHAT. We stress-test the signed formula against the four situations the parent warned about, without redrawing a single triangle — just plug in signs.
WHY. The contract: the reader must never meet a scenario we didn't show. So we tour concave (real & virtual) and convex, plus the degenerate flat-mirror limit.

| Case | Signs in | Result | Nature | |
|---|---|---|---|---|
| Concave, object beyond | real, inverted (left) | |||
| Concave, object inside | virtual, erect (behind) | |||
| Convex mirror | virtual, erect, small | |||
| Flat mirror () | virtual, same size, behind |
Notice the sign of read out the nature for free every single time: ⇒ real & in front; ⇒ virtual & behind. The flat mirror is just the limit where , giving (image as far behind as the object is in front) — exactly your bathroom mirror. No new formula needed. For what "real vs virtual" means, see Real and virtual images.
The one-picture summary

Everything collapses to: draw the axis, mark as zero, point positive the way light goes, read off signed coordinates , and the one equation does the rest. The sister equation for lenses swaps the for a because light transmits through instead of bouncing back — derived the same way in Lens formula and lensmaker's equation, with its spherical-surface roots in Refraction at spherical surfaces and stacking in Combination of thin lenses.
Recall Feynman retelling — say it back in plain words
I drew a line and stuck a mirror on the right end. I said "the way the light goes — left to right — that's my positive direction, and my zero is the pole where the axis touches the mirror." I put an object on the left; because it's on the left of zero, its distance comes out negative — that's not a trick, it's just where it sits on the ruler. I fired two rays I already understand: one parallel to the axis that bounces through the focus, one through the centre that bounces straight back. Where they crossed is the image. Then I found two triangles with the same angles, so their sides are in the same ratio; that ratio linked object height, image height, and the distances. Setting the two ratios equal and cleaning up gave me using plain positive lengths. Finally I swapped each length for its signed coordinate — multiply by , substitute , , — and out popped . The beautiful part: this one equation now handles concave, convex, real image, virtual image, even a flat mirror as the "infinite focus" limit, and the sign of the answer tells me whether the image is real or virtual without any extra thought.
Recall Quick self-check
Why does the object always give ? ::: It sits to the left of the pole, against the chosen positive (incident-light) direction, so its coordinate on the ruler is negative. Where does the minus sign in Step 6 come from? ::: We multiplied the positive-length equation by so that the lengths become the signed coordinates . What does mean for a mirror? ::: The image is behind the mirror — virtual and erect. How is a flat mirror a special case? ::: Take so , leaving : image as far behind as the object is in front, same size.