<s>[INST] 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?
 [/INST] $\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.
$$
</s>