Hyperbola as a Locus: Difference of Distances to Two Foci
A hyperbola can be defined as a locus: the set of all points \(P(x,y)\) for which the absolute
difference of distances to two fixed points (the foci) is constant. If the foci are
\(F_1(x_1,y_1)\) and \(F_2(x_2,y_2)\), the locus condition is
\[
\big|\;PF_1 - PF_2\;\big| = D,
\qquad
PF_i=\sqrt{(x-x_i)^2+(y-y_i)^2}.
\]
Let the distance between the foci be \(2c=\|F_2-F_1\|\). The constant difference \(D\) is traditionally written as
\(D=2a\). A proper hyperbola exists only when \(0<2a<2c\), i.e. \(0<D<2c\).
If \(D=2c\) the curve becomes a degenerate “border case” (two rays), and if \(D>2c\) there are no real points
satisfying the condition.
The midpoint between the foci is the center
\[
C=\left(\frac{x_1+x_2}{2},\frac{y_1+y_2}{2}\right).
\]
From \(a\) and \(c\), the remaining key parameter is
\[
b=\sqrt{c^2-a^2},
\]
and the eccentricity is \(e=\frac{c}{a}>1\). These values control the “opening” of the branches and how close the
curve stays to its asymptotes.
When the foci lie perfectly on a horizontal line, the hyperbola is axis-aligned and its standard form is
\[
\frac{(x-h)^2}{a^2}-\frac{(y-k)^2}{b^2}=1,
\]
where \((h,k)\) is the center \(C\). If the foci are vertical, the roles of \(x\) and \(y\) swap:
\[
\frac{(y-k)^2}{a^2}-\frac{(x-h)^2}{b^2}=1.
\]
In many real problems the foci are not perfectly horizontal or vertical, so the hyperbola is rotated.
For the rotated case, it’s convenient to build an orthonormal basis. Let \(\mathbf t\) be the unit direction along
the line from \(F_1\) to \(F_2\), and let \(\mathbf n\) be a perpendicular unit vector. Then for any point \(P\),
define local coordinates
\[
u=(P-C)\cdot\mathbf t,\qquad v=(P-C)\cdot\mathbf n,\qquad \mathbf t\perp\mathbf n.
\]
The hyperbola equation becomes the same clean template:
\[
\frac{u^2}{a^2}-\frac{v^2}{b^2}=1.
\]
The asymptotes describe the end behavior of the branches. In local coordinates they are
\(v=\pm\frac{b}{a}u\). In the rotated dot-product form this becomes
\[
(P-C)\cdot\mathbf n=\pm\frac{b}{a}(P-C)\cdot\mathbf t.
\]
On the interactive plot, you can pan and zoom while keeping square units, and the moving point visualization shows
that \(\big|\;PF_1-PF_2\;\big|\) remains equal to the chosen constant \(D\) along the curve.