# A theorem for calculating the perpendicular diagonals' slopes of a quadrilateral

If the slopes of side $$AB$$, $$BC$$, $$CD$$, $$DA$$ of a quadrilateral $$ABCD$$ are respectively $$m_1, m_2, m_3, m_4$$, and the diagonals (or the extended lines of them) are perpendicular, then the equation in $$p$$: $$(m_1m_3-m_2m_4)p^2-((m_2+m_4)(1+m_1m_3)\\-(m_1+m_3)(1+m_2m_4))p-(m_1m_3-m_2m_4)=0$$ is satisfied by both slopes of the diagonals (in case both exist) or by the only existing one.

This theorem can be proved by means of the theory of circumscribing conics (see my dummy answer below).

Does anyone know a different, more simple proof?

Let us separate it into three cases :

• Case 1 : $$AC$$ is parallel to the $$x$$-axis.

We may suppose that $$A(0,0),C(1,0)$$, so $$AB : y=m_1x,\qquad BC:y=m_2(x-1),$$$$CD:y=m_3(x-1),\qquad DA:y=m_4x$$from which we have $$B\left(\frac{m_2}{m_2-m_1},\frac{m_1m_2}{m_2-m_1}\right),\qquad D\left(\frac{m_3}{m_3-m_4},\frac{m_3m_4}{m_3-m_4}\right)$$(note that we may suppose that $$m_1\not=m_2$$ and $$m_3\not=m_4$$.)

So, we have\begin{align}\text{the diagonals are perpendicular} &\implies \frac{m_2}{m_2-m_1}=\frac{m_3}{m_3-m_4} \\\\&\implies m_1m_3-m_2m_4=0\end{align}Therefore, the claim is true in this case.

• Case 2 : $$AC$$ is parallel to the $$y$$-axis.

We may suppose that $$A(0,0),C(0,1)$$, so$$AB:y=m_1x,\qquad BC:y=m_2x+1,$$$$CD:y=m_3x+1,\qquad DA:y=m_4x$$from which we have$$B\left(\frac{1}{m_1-m_2},\frac{m_1}{m_1-m_2}\right),\qquad D\left(\frac{1}{m_4-m_3},\frac{m_4}{m_4-m_3}\right)$$So, we have\begin{align}\text{the diagonals are perpendicular} &\implies \frac{m_1}{m_1-m_2}=\frac{m_4}{m_4-m_3} \\\\&\implies m_1m_3-m_2m_4=0\end{align}Therefore, the claim is true in this case.

• Case 3 : $$AC$$ is neither parallel to the $$x$$-axis nor parallel to the $$y$$-axis.

We may suppose that $$A(0,0),C(1,p)$$ where $$p\not=0$$, so$$AB:y=m_1x,\qquad BC:y=m_2(x-1)+p$$$$CD:y=m_3(x-1)+p,\qquad DA:y=m_4x$$from which we have$$B\left(\frac{m_2-p}{m_2-m_1},\frac{m_1(m_2-p)}{m_2-m_1}\right),\qquad D\left(\frac{m_3-p}{m_3-m_4},\frac{m_4(m_3-p)}{m_3-m_4}\right)$$So, we have\begin{align}&\text{the diagonals are perpendicular} \\\\&\implies \frac{p-0}{1-0}\times \frac{\frac{m_1(m_2-p)}{m_2-m_1}-\frac{m_4(m_3-p)}{m_3-m_4}}{\frac{m_2-p}{m_2-m_1}-\frac{m_3-p}{m_3-m_4}}=-1 \\\\&\implies p\left(\frac{m_1(m_2-p)}{m_2-m_1}-\frac{m_4(m_3-p)}{m_3-m_4}\right)=-\left(\frac{m_2-p}{m_2-m_1}-\frac{m_3-p}{m_3-m_4}\right) \\\\&\implies p\{m_1(m_2-p)(m_3-m_4)-m_4(m_3-p)(m_2-m_1)\} \\&\qquad\qquad =-(m_2-p)(m_3-m_4)+(m_3-p)(m_2-m_1) \\\\&\implies (m_1m_3-m_2m_4)p^2 \\&\qquad\qquad -((m_2+m_4)(1+m_1m_3)-(m_1+m_3)(1+m_2m_4))p \\&\qquad\qquad -(m_1m_3-m_2m_4)=0 \\\\&\implies (m_1m_3-m_2m_4)\left(-\frac 1p\right)^2 \\&\qquad\qquad -((m_2+m_4)(1+m_1m_3)-(m_1+m_3)(1+m_2m_4))\left(-\frac 1p\right) \\&\qquad\qquad -(m_1m_3-m_2m_4)=0\end{align}Therefore, the claim is true in this case.

• Nice answer, mathlove. Could you correct a slight typo? In case 3 you have typed a letter c instead of a letter p in the ordinate of point B – MrDudulex Oct 19 '18 at 13:39
• @MrDudulex: Thank you for pointing it out. I've edited it. – mathlove Oct 19 '18 at 15:57

$$\def\peq{\mathrel{\phantom{=}}{}}$$Since the equation remains the same under translation, without loss of generality assume that line $$AC$$ and $$BD$$ intersect at the origin $$O$$. Denote by $$p$$ the slope of $$AC$$ (Assume that it exists).

Case 1: $$p = 0$$. In this case, $$y_A = y_C = 0$$, and $$AC ⊥ BD$$ implies $$x_B = x_D = 0$$. Thus,$$m_1 = -\frac{y_B}{x_A},\ m_2 = -\frac{y_B}{x_C},\ m_3 = -\frac{y_D}{x_C},\ m_4 = -\frac{y_D}{x_A} \Longrightarrow m_1 m_3 - m_2 m_4 = 0,$$ then $$p = 0$$ satisfies the given equation.

Case 2: $$p ≠ 0$$. In this case, $$AC ⊥ BD$$ implies the slope of $$BD$$ is $$-\dfrac{1}{p}$$, thus$$y_A = p x_A,\ y_C = p x_C,\ y_B = -\frac{x_B}{p},\ y_D = -\frac{x_D}{p},$$ and$$\begin{gather*} m_1 = \frac{y_B - y_A}{x_B - x_A} = -\frac{x_B + p^2 x_A}{p(x_B - x_A)},\ m_2 = \frac{y_C - y_B}{x_C - x_B} = -\frac{x_B + p^2 x_C}{p(x_B - x_C)},\\ m_3 = \frac{y_D - y_C}{x_D - x_C} = -\frac{x_D + p^2 x_C}{p(x_D - x_C)},\ m_4 = \frac{y_A - y_D}{x_A - x_D} = -\frac{x_D + p^2 x_A}{p(x_D - x_A)}. \end{gather*}$$ Thus,$$\begin{gather*} \begin{cases} m_1 p(x_B - x_A) + (x_B + p^2 x_A) = 0\\ m_2 p(x_B - x_C) + (x_B + p^2 x_C) = 0\\ m_3 p(x_D - x_C) + (x_D + p^2 x_C) = 0\\ m_4 p(x_D - x_A) + (x_D + p^2 x_A) = 0 \end{cases}\\ \Longrightarrow \begin{pmatrix} p^2 - m_1 p & m_1 p + 1 & 0 & 0\\ 0 & m_2 p + 1 & p^2 - m_2 p & 0\\ 0 & 0 & p^2 - m_3 p & m_3 p + 1\\ p^2 - m_4 p & 0 & 0 & m_4 p + 1 \end{pmatrix} \begin{pmatrix} x_A \\ x_B \\ x_C \\ x_D \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \end{pmatrix}. \end{gather*}$$ Because $$ABCD$$ is not degenerate, then $$(x_A, x_B, x_C, x_D)^T ≠ (0, 0, 0, 0)^T$$, which implies\begin{align*} 0 &= \begin{vmatrix} p^2 - m_1 p & m_1 p + 1 & 0 & 0\\ 0 & m_2 p + 1 & p^2 - m_2 p & 0\\ 0 & 0 & p^2 - m_3 p & m_3 p + 1\\ p^2 - m_4 p & 0 & 0 & m_4 p + 1 \end{vmatrix}\\ &= (p^2 - m_1 p) \begin{vmatrix} m_2 p + 1 & p^2 - m_2 p & 0\\ 0 & p^2 - m_3 p & m_3 p + 1\\ 0 & 0 & m_4 p + 1 \end{vmatrix}\\ &\peq - (p^2 - m_4 p) \begin{vmatrix} m_1 p + 1 & 0 & 0\\ m_2 p + 1 & p^2 - m_2 p & 0\\ 0 & p^2 - m_3 p & m_3 p + 1 \end{vmatrix}\\ &= (p^2 - m_1 p)(m_2 p + 1)(p^2 - m_3 p)(m_4 p + 1)\\ &\peq - (p^2 - m_4 p)(m_1 p + 1)(p^2 - m_2 p)(m_3 p + 1)\\ &= p^2 (p^2 + 1) \bigl( (m_2 m_4 - m_1 m_3)(p^2 - 1)\\ &\peq + ((m_2 + m_4)(1 + m_1 m_3) - (m_1 + m_3)(1 + m_2 m_4))p \bigr). \end{align*} Since $$p ≠ 0$$, then$$(m_2 m_4 - m_1 m_3)(p^2 - 1) + ((m_2 + m_4)(1 + m_1 m_3) - (m_1 + m_3)(1 + m_2 m_4))p = 0,$$ i.e.$$(m_1 m_3 - m_2 m_4)p^2 - ((m_2 + m_4)(1 + m_1 m_3)\\ - (m_1 + m_3)(1 + m_2 m_4))p - (m_1 m_3 - m_2 m_4) = 0.$$

• Good and sound linear algebra approach! – MrDudulex Oct 19 '18 at 19:42

Ignoring cases where various denominators vanish ...

We may assume that the (extended) diagonals meet at the origin $$O$$. If $$\overline{AC}$$ has (finite) slope $$m$$, then, for some $$a$$, $$b$$, $$c$$, $$d$$, we can write $$A = \frac{a(1,m)}{\sqrt{1+m^2}} \qquad B = \frac{b(-m,1)}{\sqrt{1+m^2}} \qquad C = \frac{c(-1,-m)}{\sqrt{1+m^2}} \qquad D = \frac{d(m,-1)}{\sqrt{1+m^2}} \tag{1}$$ (The ugly square roots are there so that we can consider $$a$$, $$b$$, $$c$$, $$d$$ signed distances along the diagonals. Happily, the square roots cancel immediately in the following algebra.) Now, we can compute successive side-slopes $$p$$, $$q$$, $$r$$, $$s$$ thusly: $$p := \frac{am-b}{a+bm} \qquad q := \frac{cm+b}{c-bm} \qquad r := \frac{cm-d}{c+dm} \qquad s := \frac{am+d}{a-dm} \tag{2}$$ These imply, respectively, $$\frac{b}{a} = \frac{m-p}{1+pm} \qquad \frac{c}{b} = -\frac{1+qm}{m-q} \qquad \frac{d}{c} = \frac{m-r}{1+rm} \qquad \frac{a}{d} = -\frac{1+sm}{m-s} \tag{3}$$ so that $$1 = \frac{b}{a}\frac{c}{b}\frac{d}{c}\frac{a}{d}= \frac{(m-p)(1+qm)(m-r)(1+sm)}{(1+pm)(m-q)(1+rm)(m-s)} \tag{4}$$ which, after clearing fractions, factoring, and dividing-through by $$1+m^2$$, gives the result. $$\square$$

Note that we can get to $$(3)$$ geometrically, by considering $$m=\tan\theta$$, $$p=\tan\alpha$$, $$q=\tan\beta$$, $$r=\tan\gamma$$, $$s=\tan\delta$$ and doing a bit of angle chasing in a typical configuration. (We take on faith that the formulas "just work" for general configurations, because trig is cool like that.)

In the configuration shown, $$a$$, $$b$$, $$c$$, $$d$$ from $$(1)$$ are exactly the (unsigned) lengths of the sub-segments of the diagonals. Now, considering various right triangles formed by those diagonals, we have, for instance:

\begin{align} \frac{b}{a} &= \tan\angle BAO = \tan(180^\circ+\theta-\alpha) = \phantom{-}\tan(\theta-\alpha)=\phantom{-}\frac{\tan\theta-\tan\alpha}{1+\tan\theta\tan\alpha} = \phantom{-}\frac{m-p}{1+mp} \\[6pt] \frac{c}{b} &= \tan\angle CBO = \tan(\;90^\circ+\theta-\beta) = -\cot(\theta-\beta)=-\frac{1+\tan\theta\tan\beta}{\tan\theta-\tan\alpha} = -\frac{1+mq}{m-q} \end{align} \tag{5}

The reader is invited to verify that $$d/c = \tan(\theta-\gamma)$$ and $$a/d=-\cot(\theta-\delta)$$.

Observe that the trigonometric form of $$(4)$$ can be written this way: $$\tan(\theta-\alpha)\tan(\theta-\gamma) = \tan(\theta-\beta)\tan(\theta-\delta) \tag{6}$$

• Nice proof, Blue. In your supplemental geometric reasoning are you considering only convex quadrilaterals? – MrDudulex Oct 19 '18 at 19:29
• @MrDudulex: The argument should work for arbitrary quadrilaterals, if proper care is taken with interpreting the signs of $a$, $b$, $c$, $d$ and handling more-complicated angle chasing and such. I gave the algebraic solution first to avoid having to formulate a geometric argument that takes all of that stuff into account. :) – Blue Oct 19 '18 at 19:48

Another solution of mine:

From the formulas given in Equations of the diagonals of a quadrilateral (convex, concave or crossed) from the equations of its sides, without calculating its vertices one can deduce these nice and neat formulas which directly show the relationship among $$m_{AC}$$, $$m_{BD}$$ and the slopes of the sides:

$$m_{AC}={m_1m_3(m_2+m_4-m_{BD})-m_2m_4(m_1+m_3-m_{BD})\over m_1m_3-m_2m_4+(m_2+m_4-m_1-m_3)m_{BD}}$$

$$m_{BD}={m_1m_3(m_2+m_4-m_{AC})-m_2m_4(m_1+m_3-m_{AC})\over m_1m_3-m_2m_4+(m_2+m_4-m_1-m_3)m_{AC}}$$

In the case that the diagonals are perpendicular, if the slope of one diagonal tends to zero, we already know that the other must tend to infinity, so $$m_1m_3-m_2m_4$$ must be equal to zero if the diagonal are perpendicular and one of them is parallel to x-axis.

Barring that case and naming $$m_{AC}$$ as $$q$$, we get from the second formula

$$-{1\over q}={m_1m_3(m_2+m_4-q)-m_2m_4(m_1+m_3-q)\over m_1m_3-m_2m_4+(m_2+m_4-m_1-m_3)q},$$ $$-{1\over q}(m_1m_3-m_2m_4)-(m_2+m_4-m_1-m_3)=m_1m_3(m_2+m_4)-m_2m_4(m_1+m_3)-(m_1m_3-m_2m_4)q,$$ $$(m_1m_3-m_2m_4)q^2-((m_2+m_4)(1+m_1m_3)-(m_1+m_3)(1+m_2m_4))q-(m_1m_3-m_2m_4)=0$$

QED.

By the way, from those formulas above for the slopes of the diagonals I discovered the theorem (and employed it previously in the solution of a numerical exercise, see Slopes of perpendicular diagonals of a quadrilateral and its sides). The proof based on the conic theory came to me later.

From the theory of conics circumscribing a quadrilateral we know that only one (degenerate or non degenerate) equilateral hyperbola passes through the four vertices of a quadrilateral (convex, concave or crossed), except when the two pairs of lines of opposite sides of the quadrilateral are perpendicular. In this exceptional case all the conics which circumscribe the quadrilateral are equilateral hyperbolas (three degenerate ones and infinite non degenerate ones).

Therefore, if $$AB \perp CD$$ and $$BC \perp DA$$, then $$m_1m_3+1=0$$ and $$m_2m_4+1=0$$ and the equation $$(m_1m_3-m_2m_4)p^2-((m_2+m_4)(1+m_1m_3)-(m_1+m_3)(1+m_2m_4))p-(m_1m_3-m_2m_4)=0$$

reduces to

$$0.p^2+0.p+0=0$$

which is obviously satisfied by both slopes of the perpendicular diagonals (in case both exist) or by the only existing slope, whichever they/it may be.

Barring this exceptional case, if the diagonal lines $$AC$$ and $$BD$$ are perpendicular, then line $$AB$$ isn't perpendicular to $$CD$$ and $$BC$$ isn't perpendicular to $$DA$$ (because if the diagonal lines are perpendicular and there is a pair of perpendicular opposite side lines, the other pair of opposite side lines will be also perpendicular). Thus $$m_1m_3+1\neq 0$$ and $$m_2m_4+1\neq 0$$.

So, being respectively $$L_1\equiv m_1x -y +r_1=0$$, $$L_2\equiv m_2x -y +r_2=0$$, $$L_3\equiv m_3x -y +r_3=0$$, $$L_4\equiv m_4x -y +r_4=0$$ the equations of lines $$AB$$, $$BC$$, $$CD$$, $$DA$$, all the conics which circumscribe the quadrilateral ABCD can be given by the equation $$kL_1L_3+L_2L_4=0$$ (except the degenerate conic consisting of the pair of lines $$AB$$ and $$CD$$).

Therefore all the conics circumscribing the quadrilateral (except the one mentioned) are given by the equation $$k(m_1x -y +r_1)(m_3x -y +r_3)+(m_2x -y +r_2)(m_4x -y +r_4)=0,$$ $$(km_1m_3+m_2m_4)x^2-((m_1+m_3)k+(m_2+m_4))xy+(1+k)y^2+...=0$$

Then the only equilateral hyperbola circumscribing the quadrilateral $$ABCD$$ is given by a value of k such that

$$(km_1m_3+m_2m_4)+(1+k)=0,$$ $$(1+m_1m_3)k+(1+m_2m_4)=0,$$ $$k=-{1+m_2m_4\over 1+m_1m_3}$$

As for the perpendicular diagonals, at least one of them has a slope, so this one can be represented by the equation $$qx-y+s=0$$, and the other by the equation $$x+qy+s'=0$$. Therefore both can be represented by the second degree equation

$$(qx-y+s)(x+qy+s')=0,$$ $$qx^2+(q^2-1)xy-qy^2+...=0$$

But this is the equation of the only equilateral hyperbola, which happens to be a degenerate one, circumscribing the quadrilateral ABCD .

Therefore the latter and the former equation have proportional coefficients, thus:

$$\begin{vmatrix} q^2-1 & -q\\ -((m_1+m_3)k+(m_2+m_4)) & (1+k)\\\end{vmatrix}=0$$

for $$k=-{1+m_2m_4\over 1+m_1m_3}$$.

Then

$$(1+k)q^2-((m_1+m_3)k+(m_2+m_4))q -(1+k)=0,$$ $$(1-{1+m_2m_4\over 1+m_1m_3})q^2-((m_1+m_3)(-{1+m_2m_4\over 1+m_1m_3})+(m_2+m_4))q -(1-{1+m_2m_4\over 1+m_1m_3})=0,$$ $$(m_1m_3-m_2m_4)q^2-((m_2+m_4)(1+m_1m_3)-(m_1+m_3)(1+m_2m_4))q-(m_1m_3-m_2m_4)=0$$

Therefore the equation $$(m_1m_3-m_2m_4)p^2-((m_2+m_4)(1+m_1m_3)-(m_1+m_3)(1+m_2m_4))p-(m_1m_3-m_2m_4)=0$$

is satisfied by the slope $$q$$ of one diagonal, and also by the slope $$-1/q$$ of the other diagonal (in case it exists, if $$q\neq 0$$),

QED.