Coordinate geometry and circles

 (This is Glen.)

As you may have noticed from my previous posts, my go-to method for approaching geometry problems is bashing, normally with coordinates. Anyone who's tried to bash a problem (especially with coordinates) would have probably found out the hard way that circles generally lead to trouble, but years of bashing have led me to devise some tricks to get around this. I'll be writing about them below, along with, as far as possible, some examples which I remember bashing. I'm not typing out solutions for the sake of my sanity, and besides, I think there is value in actually working through the algebra. Instead, I'm just going to sketch an approach which I think is the most efficient.

Introduction

Bashing apologia

Before I get lynched by the Synthetic Mafia, I should probably provide some justification for this post. Why bash? As a cynical member of the Synthetic Mafia might tell you, it's what immoral people do when they fail in thinking about a problem geometrically. It lets you solve a problem without truly grasping what it's about; it's cheating. I'd like to provide some counterarguments to this mindset.

At this year's IMO, I was talking to Dylan and he asked me why I liked bashing so much. I replied, "It's the first time in your life that you see algebra and geometry talking to each other." Bashing, in essence, is the following process: a geometry problem has certain conditions, which may be translated into algebraic equations. You want to prove some other statement, which may also be translated into an algebraic equations. You then want to rearrange your known equations to prove the new equation. You've converted a problem about geometry to a problem about algebra. Sure, maybe this new problem isn't as nice-looking, but it also gives you a new way to look at the original problem. For example, given a certain set of geometric conditions, what is the set of things we can prove from it? This doesn't really make sense geometrically, but it does algebraically. Suppose we have a bunch of equations of the form $P_i(x_1,\ldots, x_n) = 0$, where the $P_i$ are polynomials. What is the set of polynomial equations that you can deduce must hold? Well, you can add equations together, multiply them by arbitary polynomials, and — less obviously — if $P^2Q = 0$, then $PQ = 0$. Applying these operations, you end up with the radical of the ideal generated by your starting polynomials. Ideas like this and more are what you'd encounter in a first course in algebraic geometry; this is one of the myriad ways in higher math in which algebra and geometry (or topology) are intrinsically related.

But maybe you care more about Olympiad geometry. Even in this context, thinking algebraically lets you extend geometric concepts to configurations to which they otherwise don't make sense. For example, where do two concentric circles intersect? What's the length of the tangent line connecting nested circles? What's the cross ratio of points that aren't concyclic or collinear? Algebra provides answers to classical problems: Why can't we trisect an angle with a ruler and compass? (In fact, what is the set of points we can draw with a ruler and compass?) Here's an interesting one: Why can't you deduce Pappus' Theorem from Desargues' Theorem? One might say that an algebraic approach to a problem circumvents having to understand it geometrically, but on the flipside, can one truly understand geometry without algebra?

Let's step away from philosophy and move to a more practical standpoint. Bashing isn't just some mindless method that works without you having to think; on the contrary, it requires skill, and one might even call it an art. I don't just mean the skill needed to perform algebraic manipulations quickly and accurately, but also the skill required in conceiving a bash. The chance of success and time taken (if successful) can vary greatly depending on how a bash is set up, and the route one takes to compute the necessary points and relations. I remember talking to someone who graded IMO 2024/4, who said that there were two main successful approaches to complex-bashing it. One approach took the unit circle to be the incircle, and the other took it to be the circumcircle. The resulting bash for one method was several times longer than the other. (Which is which? I'll leave you to figure that out.) Finding an optimal bashing route is a puzzle in itself: Given a certain set of operations (intersecting lines, dropping perpendiculars, etc.), which route to a solution has the least algebraic complexity? This can be tricky to determine, and very much appeals to the combinatorial part of my brain. Bashing shouldn't be a source of shame, unless your bash is five times longer than it needs to be. (This is the purpose of this post, to help you avoid this tragic scenario.)

Bashing introduction

If you're completely unfamiliar with bashing, here's a short set of notes I wrote back in the day: tinyurl.com/synthsucks. (There are some minor things that I would like to change, but that's a task for another day. I might redo it in the form of a blog post at some point.) Section 3 overlaps somewhat with what I'm going to write about below, so you can skip that.

I'll be focusing on coord geom in this post because it's the system I'm most familiar with, and also because I'm hoping that this post will convince you that coord geom isn't as incompatible with circles as traditional wisdom dictates. In fact, I'd go so far as to say that with the methods below, using coord geom for some circle questions might work out better than complex, which has a better circle formula at the expense of expresssions generally being a little more...complex (ba dum tss). Speaking of which, I suspect some of what I write will also be applicable to complex numbers, though I can't say for certain.

Anyway, that's enough waffling. Let's begin.

Getting rid of the circle

Well, duh. The circle does not spark joy, so you try to reframe the question in such a way that it's no longer there. Here's an example:

(APMO 2016/3) Let $AB$ and $AC$ be two distinct rays not lying on the same line, and let $\omega$ be a circle with center $O$ that is tangent to ray $AC$ at $E$ and ray $AB$ at $F$. Let $R$ be a point on segment $EF$. The line through $O$ parallel to $EF$ intersects line $AB$ at $P$. Let $N$ be the intersection of lines $PR$ and $AC$, and let $M$ be the intersection of line $AB$ and the line through $R$ parallel to $AC$. Prove that line $MN$ is tangent to $\omega$.

I failed this back in the day (sigh). I tried to set $\omega$ to be the unit circle but things got out of hand; letting $R$ be a variable point on $EF$ ended up being quite yuck. I was mad at myself when I realised that a simpler approach existed: if you view $\triangle AEF$ as the "main triangle", every point can be constructed just with parallel and perpendicular lines. Here's a walkthrough:

  • Set $A(0,1),E(a,0),F(-a,0),R(b,0)$.
  • Solve for $O$: the intersection of the line through $E$ perpendicular to $AE$ and the $y$-axis. (Of course, it also lies on the line through $F$ perpendicular to $AF$, but why use that when you have the $y$-axis?)
  • Solve for $P,M,N$ as defined in the question.
  • Check that $d(O,MN) = OE$, e.g. using the distance formula.

This one requires some more thinking:

(CWMI 2017/3) In triangle $ABC$, let $D$ be a point on $BC$. Let $I_1$ and $I_2$ be the incenters of triangles $ABD$ and $ACD$ respectively. Let $O_1$ and $O_2$ be the circumcenters of triangles $AI_1D$ and $AI_2D$ respectively. Let lines $I_1O_2$ and $I_2O_1$ meet at $P$. Show that $PD\perp BC$.

One might be tempted to look at the four circles in the question and run away screaming. However, there are a couple of key observations: Firstly, $\angle I_1DI_2 = 90^{\circ}$. Secondly, if we start with $I_1,I_2,O_1,O_2$, then $A$ is now useless to the problem, and we don't need to find $B$ and $C$ exactly; we just need $BC$. This gives us the following approach:

  • Set $D(0,0),I_1(a,0),I_2(0,b)$.
  • Then, $O_1$ has to lie on the perpendicular bisector of $I_1D$, i.e. $x=\frac{a}2$. So let $O_1\left(\frac{a}2,c\right)$, and likewise let $O_2\left(d,\frac{b}2\right)$.
  • Compute $P$ as in the question.
  • Line $AD$ is the line through $D$ perpendicular to $O_1O_2$; compute its gradient.
  • $BC$ is the reflection of $AD$ across either axis, so its gradient is the negative of gradient $AD$.
  • Check that $PD\perp BC$.

And a final example:

(CHKMO 2014/4) Let $\triangle ABC$ be a scalene triangle, and let $D$ and $E$ be points on $AB$ and $AC$ respectively such that the circumcircles of triangles $\triangle ACD$ and $\triangle ABE$ are tangent to $BC$. Let $F$ be the intersection point of $BC$ and $DE$. Prove that $AF$ is perpendicular to the Euler line of $\triangle ABC$.

This turned out to be not very easy to do synthetically (some of the other people who participated in this are very good at geometry but couldn't solve it under contest conditions), but pretty easy to bash. Here's what I did in the contest:

  • Set $A(0,1),B(a,0),C(b,0)$.
  • Compute the circumcentre $O$ of $\triangle ACD$: it lies on the perpendicular bisector of $AC$ and the line through $C$ perpendicular to $BC$ (i.e. $x=b$).
  • Solve for the midpoint of $AD$: drop a perpendicular from the $O$ to $AB$. In fact, you only need to solve for the $x$-coordinate.
  • Reflect $A$ across midpoint $AD$ to get $D$.
  • Compute $F'$, the intersection of $BC$ and the line through $A$ perpendicular to the Euler line (I'd memorised this, but you could easily compute the circumcentre and orthocentre of $\triangle ABC$).
  • Check that gradient $DF'$ is symmetric across $a,b$.

After we get to $D$, the obvious way to proceed is to write down what $E$ is (by symmetry), then compute $F$, and then gradient $AF$. That's not bad, but taking a phantom point $F'$ instead lets you exploit symmetry even more. You might also want to think about why we only needed one of the coordinates for midpoint $AD$.

Actually, this solution somewhat subconsciously uses the next idea I'm going to write about.

Intersecting a line with a circle (again)

Circles are scary because you have to solve quadratic equations. But what if you...didn't? If you want to intersect a line with a circle and you already know one of the intersection points, this turns out to be fine. (The same goes for the second intersection of two circles; indeed, if you take the difference of their equations, you get the equation of their radical axis, which you can intersect with either circle to get the second intersection.)

Dropping a perpendicular

The first way to do this is to drop a perpendicular from the centre of the circle to the line, and then reflect the known intersection across it. For the intermediate step, you don't even need to find both coordinates: suppose the line is $y=mx+c$, the known point has $x$-coordinate $a$, and the foot of the perpendicular has $x$-coordinate $b$. Then all you have to do is to compute $x=2b-a$ and plug it into the equation of the line to find $y$.

Vieta

The other way to think about it is: you have a quadratic equation (by substituting the equation of the line into the equation of the circle), to which you know one root. The other root can then be found by either one of Vieta's formulas: suppose we have $ax^2 + bx + c = 0$ and we know $r$ is a root. Then, we just need to compute $-\frac{b}a - r$ or $\frac{c}{ar}$. The latter works better if you already have a nice factorisation of $a,c$, otherwise the former might be better to compute.

I think both approaches are in general roughly comparable in complexity, so it's really a matter of preference and/or context.

Here's a problem for which I used these ideas:

(ISL 2015 G3) Let $ABC$ be a triangle with $\angle{C} = 90^{\circ}$, and let $H$ be the foot of the altitude from $C$. A point $D$ is chosen inside the triangle $CBH$ so that $CH$ bisects $AD$. Let $P$ be the intersection point of the lines $BD$ and $CH$. Let $\omega$ be the semicircle with diameter $BD$ that meets the segment $CB$ at an interior point. A line through $P$ is tangent to $\omega$ at $Q$. Prove that the lines $CQ$ and $AD$ meet on $\omega$.

This appeared as NTST 2016/5 (i.e. Day 1 Q1), and I thought my hopes of making the IMO team were over until I realised that it was more bashable than it seemed initially. The way the question is phrased (why use semicircles instead of circles?) suggests some horrible configuration issue. Configuration issues mean choosing a root, which means having to actually solve a quadratic equation, which means square roots. Indeed, if we tried to bash the points in the order they are given, we'd run into some trouble at the step in which we construct $Q$.

However, if we remember that intersecting lines with circles is okay as long as we know one of the intersections, there's a way to redraw the diagram to avoid such issues: Let's say we have $A,B,C,H,D,P$ as in the question. Then, instead of proceeding to find $Q$, we can intersect $AD$ with $\omega$ (again) at $X$, and then intersect $CX$ with $\omega$ (again) to get $Q'$. We're left with showing that $PQ'$ is tangent to $\omega$, which is something we can do with just lines and gradients.

Here's what I did during the NTST (at least, as far as I can recall):

  • Set $A(-1,0),C(0,a),B(a^2,0)$, so $H(0,0)$.
  • Then, the locus of $D$ is the line $x=1$, so set $D(1,b)$.
  • Solve for $P$ by intersecting $BD$ with the $y$-axis.
  • The equation for $\omega$ is $(x-a^2)(x-1) + y(y-b) = 0$ (it's the locus of points $Z$ such that $ZD\perp ZB$).
  • Using Vieta, solve for $X$, the second intersection of $AD$ with $\omega$.
  • Using Vieta again, solve for $Q'$, the second intersection of $CX$ with $\omega$.
  • Let $R$ be the foot of perpendicular from $Q$ onto $BD$. Then $(P,R;B,D)=-1$, so $\frac{DR}{RB} = -\frac{DP}{PB} = \frac{1}{a^2}$, which lets us compute $R$ directly from the coordinates of $B$ and $D$.
  • Check that $Q'R\perp BD$.

In this case, I used the Vieta approach because the equation of the circle $\omega$ was nice, but I'm sure the other way would have been fine as well. I'm not sure how much better (if at all) the final trick with the harmonics is compared to just showing that $CQ'$ is perpendicular to the line through $Q'$ and midpoint $BD$; it's probably just a slight improvement. I suppose it's preferable because you use $Q'$ only once instead of twice, and we know that gradient $Q'R$ has to cancel to something nice (since gradient $BD$ is nice). A final note: it's tempting (given the  $\angle{C} = 90^{\circ}$ condition) to just set $C$ to be the origin, but then everything becomes worse (just think about $H,D,P$). Be careful when setting up coordinates!

This method ends up being useful in setting up extra points on the circumcircle, which we'll see below.

Points on circumcircles

In my usual setup for triangles (setting the vertices to be $A(0,1),B(a,0),C(b,0)$), the circumcentre and circumcircle turn out to be fairly nice: we have $O\left(\frac{a+b}2,\frac{1+ab}2\right)$ and the circumcircle is $\left(x - \frac{a+b}2\right)^2 + \left(y - \frac{1+ab}2\right)^2 = \frac{(a^2+1)(b^2+1)}4$ (verify this!). But what if we want to construct an arbitrary point $P$ on the circumcircle?

Variable line

One way to do this is to use the trick above. Let $AP$ be the line $y=mx+1$, and then intersect it again with the circumcircle to get $P$. Here's a problem for which I used this trick:

(SMO Open 2019/1) In the acute-angled triangle $ABC$ with circumcircle $\omega$ and orthocenter $H$, points $D$ and $E$ are the feet of the perpendiculars from $A$ onto $BC$ and from $B$ onto $AC$ respecively. Let $P$ be a point on the minor arc $BC$ of $\omega$ . Points $M$ and $N$ are the  feet of the perpendiculars from $P$ onto lines $BC$ and $AC$ respectively. Let $PH$ and $MN$ intersect at $R$. Prove that $\angle DMR=\angle MDR$.

I bashed this while invigilating the paper. Apparently this is a well-known lemma about the Simson line, but it wasn't well-known to me. Here's a walkthrough:

  • Set up $A,B,C,P$ as described above. Then $D(0,0)$.
  • Solve for $H$ (or pull it out from memory).
  • Find $R'$, the midpoint of $PH$. 
  • Find the $x$-coordinate of $N$ by intersecting $AC$ with the line through $P$ perpendicular to $AC$.
  • Intersect $MR'$ and $AC$ and find the $x$-coordinate.
  • Check that these two are equal.

I'm not entirely sure what the fastest way to finish up would be, but this seems like the least evil way to check that $R'M,AC$ and the line through $P$ perpendicular to $AC$ are concurrent.

$t$-formula

As anyone who knows how to complex bash would tell you, you could just set the circumcentre to be the unit circle. This works great in complex numbers, but...not so well in coordinates. The temptation would be to set things as $(\cos \alpha, \sin \alpha)$ and so on, but that's bad in general: you lose one of the major benefits of coord geom, which is being able to work with polynomials. (When you work with polynomials, if two things are equal, they will look equal. When trigonometric functions are involved, you might have to apply identities.) If you want to do that, you might as well just trigo-bash directly, which can probably be done with nicer expressions than doing a trigo-coord hybrid.

Instead, a nice trick would be to use the $t$-formulas: we can let points be $\left(\frac{1-a^2}{1+a^2},\frac{2a}{1+a^2}\right)$ and so on, and we're back in polynomial-land. The example that stands out to me is:

(ISL 2018 G7) Let $O$ be the circumcentre, and $\Omega$ be the circumcircle of an acute-angled triangle $ABC$. Let $P$ be an arbitrary point on $\Omega$, distinct from $A$, $B$, $C$, and their antipodes in $\Omega$. Denote the circumcentres of the triangles $AOP$, $BOP$, and $COP$ by $O_A$, $O_B$, and $O_C$, respectively. The lines $\ell_A$, $\ell_B$, $\ell_C$ perpendicular to $BC$, $CA$, and $AB$ pass through $O_A$, $O_B$, and $O_C$, respectively. Prove that the circumcircle of triangle formed by $\ell_A$, $\ell_B$, and $\ell_C$ is tangent to the line $OP$.

I remember test-solving this while preparing for June training in 2019, and it took me 15 minutes, which is many times shorter than one would expect a G7 to take. Apparently, the synthetic solution wasn't especially hard either (though certainly harder than the bash), so I'm not sure what this was doing as a G7. Get your act together, 2018 PSC.

  • Let $O(0,0), P(1,0), A\left(\frac{1-a^2}{1+a^2},\frac{2a}{1+a^2}\right)$, and $B,C$ similarly.
  • The magic of $t$-formula gives $O_A\left(\frac12,\frac{a}2\right)$.
  • Find gradient $BC$, and so gradient $\ell_A$.
  • To get rid of all the $\frac12$s in the $x$-coordinate, translate all points left by $\frac12$.
  • Find the equation for $\ell_A$ (and so $\ell_B,\ell_C$ by symmetry) and so $X_A$.
  • Notice that the numerator of the $y$-coordinate of $X_A$ is symmetric across $a,b,c$. Translate the diagram horizontally so that the $x$-coordinate of $X_A$ is divisible by this polynomial.
  • Apply a suitable homothety to get rid of this factor. How does this relate to our $t$-formulas?

I was so annoyed by this problem that I bothered to write a solution on AoPS, if you want more details. Evan Chen has also posted a complex bash but my solution is faster.

The $t$-formula trick also happens to be one of the better ways to deal with incircles.

Incentres

Incircles are kind of annoying because we can't do angle bisectors (well, not more than one if you don't want to have square roots).

Incircles as the unit circle

The conventional wisdom from complex bashing is to set the incircle as the unit circle, and this generally works for coordinates as well. Here's a picture, because I don't want to type everything out.

Sure, you have to solve for the last vertex of the triangle, but that's not quite so bad, is it? By the way, the exact same setup works for excentres as well.

The following is a pretty standard harmonic question, but I can't really think of anything else.

(CHKMO 2018/3) The incircle of $\triangle{ABC}$, with incentre $I$, meets $BC, CA$, and $AB$ at $D,E$, and $F$, respectively. The line $EF$ cuts the lines $BI,CI, BC$, and $DI$ at $K,L,M$, and $Q$, respectively. The line through the midpoint of $CL$ and $M$ meets $CK$ at $P$.

(a) Determine $\angle{BKC}$. (b) Show that the lines $PQ$ and $CL$ are parallel.

 Here's an outline:

  • Set up as above (with $A$ being the last vertex which we don't actually have to solve for).
  • Find the equation of $EF$.
  • Solve for $K = EF\cap BI$.
  • (Spoiler for part (a)) Check that $BK\perp KC$.
  • Solve for $M=EF\cap BC$ (or note that $(M,D;B,C)=-1$ but who needs harmonics really) and for $Q = EF\cap DI$.
  • Find the midpoint of $CL$, and hence the gradient of $MP$.
  • Let $P'$ be on $CK$ such that $P'Q\parallel CL$. Solve for $P'$.
  • Find gradient $MP'$, and hence get $P=P'$.

Incentres as an orthocentre

A trick people don't really know about is to let the excentres be the "main triangle", and then the incentre becomes the orthocentre, and then $\triangle ABC$ is its pedal triangle. This makes the circumcentre become the nine-point centre, which is still pretty nice. This method is good when the question also includes an excentre (or better, all three). Here's an example:

(ISL 2016 G7) Let $I$ be the incentre of a non-equilateral triangle $ABC$, $I_A$ be the $A$-excentre, $I'_A$ be the reflection of $I_A$ in $BC$, and $\ell_A$ be the reflection of line $AI'_A$ in $AI$. Define points $I_B$, $I'_B$ and line $\ell_B$ analogously. Let $P$ be the intersection point of $\ell_A$ and $\ell_B$.

(a) Prove that $P$ lies on line $OI$ where $O$ is the circumcentre of triangle $ABC$.

(b) Let one of the tangents from $P$ to the incircle of triangle $ABC$ meet the circumcircle at points $X$ and $Y$. Show that $\angle XIY = 120^{\circ}$.

Some backstory: IMO 2016 Day 1 was GCN, so we were expecting Day 2 to be something like NAG. I figured that my best chance of being able to solve a Q6 geometry problem was to just go all-in and bash it, and so I went into Day 2 planning to do that if I solved the first two problems. As it turned out, Q6 ended up being combi, which was a pleasant surprise that worked out well for me. But after the shortlist came out, I did try to bash this to see what would have happened if G7 had come out instead of C7. (I think I'd have managed to get through part (a) but I'm not sure if I would have finished (b) in time.) Warning: this bash is pretty long.

Part (a) is fairly standard, if very tedious:

  • Let $I_A(a,0),I_B(b,0),I_C(0,1)$, so $I(0,-ab),C(0,0)$ and $A\left(\frac{b(ab+1)}{b^2+1},\frac{b(b-a)}{b^2+1}\right)$ and $B$ is similar. $OI$ is now the Euler line.
  • Reflect $I_A$ across $BC$, and then across $AI$ to get $I_A''$ (this sounds simple, but in reality is pretty bad).
  • Intersect $AI_A''$ (i.e. $\ell_A$) with the Euler line to get $P'$.
  • Check that $P'$ is symmetric across $a,b$, so $P=P'$. This solves (a).

I can't remember if this is exactly what I did. I might have instead intersected $CI_C''$ with the Euler line to get $P''$ and checked that this is collinear with $A$ and $I_A''$. (Finding $P$ in this way is actually pretty nice — I just tried.)

Part (b), on the other hand, requires some ingenuity. Notice that the denominators of $P$ can be written as $(3ab+1)^2 + (a+b)^2$, which is very suspicious (it's closely related to distances of points on $OI$!). Moreover, once we get to this point, all we really need to care about are $P,O,I$ (which are collinear!) as well as the circumcircle and the incircle. We also know that $OI^2 = R(R-2r)$, so the inradius can be expressed in terms of $R$ and $OI$. On the other hand, given $OI$ and $R$, there are only finitely many $P$ which can satisfy (b), so we need $P$ to depend on $OI$ and $R$ somehow. Now, if we take the difference between the $x$-coordinate of $P$ and the $x$-coordinate of $O$ (which is $\frac{a+b}4$), the numerator looks suspiciously like the numerator of $R^2$...

Combining all the above information, you can notice that $OI \cdot OP = R^2$ (lengths directed). (This took me quite a while to notice when I first did it.) Now, we can do (b) by setting a new set of coordinates:

  • Let $O(0,0),I(1,0),P(R^2,0)$; let the circumcircle be $x^2+y^2=R^2$, and the incircle be $(x-1)^2+y^2 = \left(\frac{R^2-1}{2R}\right)^2$. WLOG let $X,Y$ be above the $x$-axis.
  • Let $XY$ be tangent to the incircle at $Z$ and drop a perpendicular from $Z$ to meet $x$-axis at $Z'$. Using $\triangle PZZ' \sim \triangle PIZ$, find the gradient of $XY$ and hence the equation for $XY$. This looks terrifying because there's a square root, but it vanishes in the next step.
  • Plug that into the equation for the circumcircle to get a quadratic. Let its roots be $\alpha,\beta$.
  • In terms of $\alpha,\beta$, find the gradient of $XI$, and so $YI$ by symmetry (call these $m, m'$).
  • Using Vieta on $\alpha,\beta$, prove that $\frac{\lvert m-m' \rvert}{1 + mm'} = -\sqrt{3}$.

Above, I wrote about what happens when you intersect a line with a circle and you already know one of the points. In situations like this when you know neither of the points but the question is symmetric across both of them, you don't have to solve for the points exactly. You can get around this by applying Vieta instead. (If the question wants you to choose a root by fixing a configuration, then this is probably not the way to go.)

By the way, Evan Chen has a pretty nice barycentric bash for this on AoPS. (The part (a) in particular is a lot better.) On the other hand, it's worth noting that we're done from $OI \cdot OP = R^2$ immediately using his lemma, so in a way this coord geom approach gives more.

Incentres from barycentric coordinates

The formula for the incentre in barycentric coordinates is quite nice: it's $(a:b:c)$. So in theory, you can use the standard setup for triangles and then write down what the incentre is as a weighted average of the three vertices. This is of course not great because you get square roots. I have used this trick exactly once in my life and it was for this problem. (Presumably, it would have been better to just bash this directly with barycentric coordinates.) I'm not writing a walkthrough for this; you just plug in the formula for the incentre and bash gradients.

Power of a point

I somewhat alluded to this in the 2016 G7 solution, but I should probably make it explicit. If you have three points $A,B,C$ on a line $y = mx+b$, say with $x$-coordinates $a,b,c$ respectively, then the expression for $AB\cdot AC$ is actually not bad: it's $(a-b)(a-c)(m^2+1)$. Note the lack of square roots.

This gives us a fairly decent way to deal with cyclic quadrilaterals while also getting the intersection of their diagonals for free: Let $ABCD$ be a cyclic quadrilateral and $X = AC\cap BD$. Then we can set $X(0,0),A(a,0),C(b,0),B(1,c),D\left(\frac{ac}{b^2+1},\frac{abc}{b^2+1}\right)$. One could modify this accordingly if one cared about, say, $AB\cap CD$ instead of $X$.

Antipodes

I'll start with the example.

(SMO Open 2014/1) The quadrilateral $ABCD$ is inscribed in a circle which has diameter $BD$. Points $A'$ and $B'$ are symmetric to $A$ and $B$ with respect to the lines $BD$ and $AC$ respectively. If the lines $A'C, BD$ intersect at $P$ and $AC,B'D$ intersect at $Q$, prove that $PQ$ is perpendicular to $AC$.

The temptation for this is, especially if you have vaguely learnt about complex bashing, to set the circle to be the unit circle and $B,D$ to be $(\pm 1, 0)$. But then you'd either get square roots or have to use the $t$-formula (which ends up working, but isn't optimal).

Instead, a better way to approach this would be to set $A(a,0),B(0,1),C(b,0)$, and then $D(a+b,ab)$. Everything else follows nicely.

I still haven't forgiven myself for failing this in the contest.

Inversion

The last trick I'll talk about is inversion. The idea is simple: inversion converts circles into lines, so if you can do it in such a way that makes the circles disappear (or at least, more susceptible to one of the techniques above), then you can bash the new diagram. This was actually the motivation behind this whole post: this worked on not one, but two NTST problems this year.

Let's start with Day 1 Q3:

(ISL 2023 G6) Let $ABC$ be an acute-angled triangle with circumcircle $\omega$. A circle $\Gamma$ is internally tangent to $\omega$ at $A$ and also tangent to $BC$ at $D$. Let $AB$ and $AC$ intersect $\Gamma$ at $P$ and $Q$ respectively. Let $M$ and $N$ be points on line $BC$ such that $B$ is the midpoint of $DM$ and $C$ is the midpoint of $DN$. Lines $MP$ and $NQ$ meet at $K$ and intersect $\Gamma$ again at $I$ and $J$ respectively. The ray $KA$ meets the circumcircle of triangle $IJK$ again at $X\neq K$. 

Prove that $\angle BXP = \angle CXQ$.

 Intuitively, you want to try to inverflect at $A$, since there are two circles tangent there. But this turns out to be pretty yucky — your midpoint conditions become horrible symmedians, for example. But you could also realise that almost all the points lie on either $\Gamma$ or $BC$, which conveniently meet at $D$. Inverting about $D$, we get two parallel lines, and a lot of cyclic trapeziums, i.e. isosceles trapeziums. We then get most of the points for free:


Then, this is what I did:

  • Solve for the circumcentre $O$ of $P'M'DI'$. (The $x$-coordinate is free.)
  • Notice that $A'P'\cdot A'I' = A'J' \cdot A'Q'$, so $A',D,K'$ collinear.
  • Find $K'$ by dropping a perpendicular from $O$ to $A'D$ and reflecting $D$ across it.
  • Let $X'(dy,y)$. Solve $A'X'\cdot A'K' = A'I'\cdot A'J'$ (directed lengths) to get $y=\frac12$.
  • Realise that $X'$ is the centre of the parallelogram $B'C'P'Q'$, so we're done, but also, there should be a synthetic solution.
  • Find a synthetic solution and sigh. (Here's one: $\frac{A'K'}{A'D} = \frac{\frac{A'I'\cdot A'J'}{A'K'}}{\frac{A'P'\cdot A'I'}{A'K'}} = \frac{A'J'}{A'P'} = \frac12$. I just realised that this is an application of Reim. I'm not good at synthetic, okay?)

So that was nice, if somewhat unsatisfying, because I felt stupid for not spotting the synthetic finish. (By the way, even without the observation that $A'$ lies on the radical axis, the longer route which goes through intersecting $(P'M'DI')$ and $(Q'N'DJ')$ to find $K'$ works pretty nicely as well. Really, you can't go wrong because all the points are so nice.) I'm not sure why all the solutions on AoPS are so long but it makes me feel a little better about myself.

Anyway, this then appeared as Day 2 Q2:

(ISL 2023 G5) Let $ABC$ be an acute-angled triangle with circumcircle $\omega$ and circumcentre $O$. Points $D\neq B$ and $E\neq C$ lie on $\omega$ such that $BD\perp AC$ and $CE\perp AB$. Let $CO$ meet $AB$ at $X$, and $BO$ meet $AC$ at $Y$.

Prove that the circumcircles of triangles $BXD$ and $CYE$ have an intersection lie on line $AO$.

This time, inverflection actually gives something nice. The condition $BD\perp AC$ becomes $AB$ being the diameter of $(ACD')$, which is very much bashable.

  • Set $A(0,1),B(a,0),C(b,0)$, so $O'(-1,0)$.
  • Find the $x$-coordinate of the centre of $(ACD')$: this is the intersection of $AB$ and the perpendicular bisector of $AC$.
  • Then, take $2x-c$ to find $D'$.
  • Find the centre of $(AO'B)$ by intersecting $BC$ with midpoint $AB$.
  • Drop a perpendicular to $AC$ and reflect $A$ across it to get $X'$.
  • Solve for the centre of $(CX'D')$ (the $x$-coordinate is free).
  • Put $x=0$ into the equation of $(CX'D')$ to get a quadratic in $y$ (the radius of $(CX'D')$ can be obtained by calculating the distance from $C$ to the circumcentre).
  • Have faith that the answer is nice and guess the factorisation. The constant coefficient is fairly nice, so this isn't too hard. If it helps, you expect one of the factors to be symmetric across $b,c$. Spoiler: by some magic, one root turns out to correspond to the orthocentre!

Of course, if you fail to guess, the quadratic formula should do the job. I was very amused when "invert and coord geom" worked for the second day in a row.

Great, now I can finally bin my rough work for these two problems that has just been sitting in a pile in my room occupying space.

Conclusion

I hope I've demonstrated that bashing is more than just mindless computation: putting thought into optimising a bashing path goes a long way in making a bash shorter and hence less time-consuming and less prone to error. This can often be the difference between a successful bash and a waste of 3 hours in a contest. It can be hard to judge whether how feasible a bash is, and the only thing that really helps with that is experience. So: practise bashing. Try the problems above, using the walkthroughs above and/or using your own approaches. Get a feeling for what method is faster than another, and in what situations. Figure out when you'd expect certain things to cancel, or factorise. Learn how to recognise when something goes wrong, and how to troubleshoot it. Bash away, and above all, have fun.

Comments

Popular posts from this blog

SMO Open 2024 ??% Speedrun

Musings about the IMO