Conic Equation from Properties Calculator – Foci, Vertex, Directrix
A conic section (parabola, ellipse, hyperbola) can be described either by an equation
or by geometric properties such as a focus, a directrix, or a pair of foci.
This calculator builds the equation from the properties for axis-aligned conics
(no rotation, so no \(xy\) term).
1) Parabola from focus and directrix
A parabola is the set of points whose distance to a fixed point (the focus)
equals its distance to a fixed line (the directrix):
\[
\text{distance}(P,F)=\text{distance}(P,\text{directrix}).
\]
For axis-aligned parabolas, the standard (focus-directrix) forms are:
-
Vertical axis (directrix is horizontal):
\[
(x-h)^2 = 4p(y-k)
\]
Vertex \(V=(h,k)\), focus \(F=(h,k+p)\), directrix \(y=k-p\).
-
Horizontal axis (directrix is vertical):
\[
(y-k)^2 = 4p(x-h)
\]
Vertex \(V=(h,k)\), focus \(F=(h+p,k)\), directrix \(x=h-p\).
The parameter \(p\) is the signed distance from the vertex to the focus:
\(p>0\) means the parabola opens up/right, \(p<0\) opens down/left.
How to compute the vertex and \(p\) from focus and directrix
Suppose the focus is \(F=(x_f,y_f)\).
-
If the directrix is \(\,y=d\), then the axis is vertical, and the vertex is halfway between
\(y_f\) and \(d\):
\[
h=x_f,\qquad k=\frac{y_f+d}{2},\qquad p=\frac{y_f-d}{2}.
\]
Then \((x-h)^2=4p(y-k)\).
-
If the directrix is \(\,x=d\), then the axis is horizontal:
\[
k=y_f,\qquad h=\frac{x_f+d}{2},\qquad p=\frac{x_f-d}{2}.
\]
Then \((y-k)^2=4p(x-h)\).
Example
Focus \(F=(0,2)\), directrix \(y=-2\):
\[
k=\frac{2+(-2)}{2}=0,\quad p=\frac{2-(-2)}{2}=2,\quad h=0.
\]
So
\[
(x-0)^2=4(2)(y-0)=8y\quad\Rightarrow\quad y=\frac{x^2}{8}.
\]
2) Parabola from vertex and \(p\)
If you already know the vertex \(V=(h,k)\) and the parameter \(p\), the equation is immediate:
- \((x-h)^2=4p(y-k)\) for a vertical axis.
- \((y-k)^2=4p(x-h)\) for a horizontal axis.
3) Ellipse from two foci and \(a\)
An ellipse is the set of points \(P\) such that the sum of distances to two foci
is constant:
\[
PF_1 + PF_2 = 2a.
\]
For an axis-aligned ellipse centered at \(C=(h,k)\), define:
\[
c=\text{distance from center to each focus},\qquad a=\text{semi-major axis}.
\]
Then
\[
b=\sqrt{a^2-c^2}\quad\text{(requires }a>c\text{)}.
\]
If the foci lie on a horizontal line (same \(y\)), the major axis is horizontal:
\[
\frac{(x-h)^2}{a^2}+\frac{(y-k)^2}{b^2}=1.
\]
If the foci share the same \(x\), the major axis is vertical:
\[
\frac{(x-h)^2}{b^2}+\frac{(y-k)^2}{a^2}=1.
\]
The eccentricity is
\[
e=\frac{c}{a}\quad (0<e<1\text{ for an ellipse}).
\]
4) Hyperbola from two foci and \(a\)
A hyperbola can be defined by the absolute difference of distances to two foci:
\[
|PF_1 - PF_2| = 2a.
\]
For an axis-aligned hyperbola centered at \(C=(h,k)\), the focal distance is \(c\) and
\[
c^2 = a^2 + b^2 \quad\Rightarrow\quad b=\sqrt{c^2-a^2},
\]
which requires \(c>a\).
If the foci are horizontal (same \(y\)), the transverse axis is horizontal:
\[
\frac{(x-h)^2}{a^2}-\frac{(y-k)^2}{b^2}=1.
\]
If the foci are vertical (same \(x\)), the transverse axis is vertical:
\[
\frac{(y-k)^2}{a^2}-\frac{(x-h)^2}{b^2}=1.
\]
The eccentricity is
\[
e=\frac{c}{a}\quad (e>1\text{ for a hyperbola}).
\]
Asymptotes (for a horizontal transverse axis) are
\[
y-k = \pm \frac{b}{a}(x-h),
\]
and similarly for a vertical transverse axis.
5) Notes and limitations
-
This tool assumes no rotation. If your conic has an \(xy\) term, you need a rotation-of-axes step.
-
Ellipse/hyperbola modes require the foci to be aligned horizontally or vertically (same \(x\) or same \(y\)).
-
For parabola focus/directrix mode, \(p=0\) is invalid (focus and directrix would coincide).