What is the equation for an ellipse given 3 points and the tangent line at those points?

A computationally-expensive approach (that avoids solving a linear system of six unknowns with only five variables) is to consider that the equation of the conic through the points $P=(P_x, P_y)$, $Q=(Q_x,Q_y)$, $R=(R_x,R_y)$, $S=(S_x,S_y)$, $T=(T_x,T_y)$ is given by

$$\left|\begin{array}{c,c,c,c,c,c} x^2 & y^2 & x y & x & y & 1 \\ P_x^2 & P_y^2 & P_x P_y & P_x & P_y & 1 \\ Q_x^2 & Q_y^2 & Q_x Q_y & Q_x & Q_y & 1 \\ R_x^2 & R_y^2 & R_x R_y & R_x & R_y & 1 \\ S_x^2 & S_y^2 & S_x S_y & S_x & S_y & 1 \\ T_x^2 & T_y^2 & T_x T_y & T_x & T_y & 1 \\ \end{array}\right| = 0$$

You are given three points, say, $P = (0,-3)$, $Q = (1,0)$, $R=(0,3)$. You need two more. We can approximate them using small displacements along any two of the tangent lines. For instance, $$m_1 = 1: \;S = P + s\,(1,1) = (s,s-3) \qquad m_2 = \infty: T = Q + t\,(0,1) = (1,t)$$

Expanding the determinant with the help of a tool such as Mathematica, yields

$$-6 s t \left(\quad\begin{array}{c} (3+s+3t-st) x^2 + t(s-1) x y - (s-1) y^2 \\ + ( 6-10s-3t+st) x + 9 (s-1) \end{array}\quad\right)= 0$$

Using typical Calculus chicanery, we insist that $s$ and $t$ are merely small, not zero, so that we can divide them out of the equation ...

$$(3+s+3t-st) x^2 + t(s-1) x y - (s-1) y^2 + ( 6-10s-3t+st) x + 9 (s-1)= 0$$

... and then proceed to calculate the limiting form of the equation as $s$ and $t$ become vanishingly small ... by substituting $s=t=0$!

$$3 x^2 + y^2 + 6 x - 9 = 0$$

Note that, upon differentiation, we have $$6 x + 2 y y^\prime + 6 = 0$$ which is satisfied by $(x,y) = (0,3)$ and $y^\prime = -1$.


Start with something relatively easy—find the circle that passes through $P_1$ and $P_3$ and has the appropriate tangents. Its center is the intersection of the perpendiculars to the tangents through the two points. By symmetry, that’s at $(-3,0)$, and its radius is then $3\sqrt2$. Let $$f: (x,y)\mapsto(x+3)^2+y^2-18$$ so that the equation of this circle is $f(x,y)=0.$ Now let $$g:(x,y)\mapsto(x+y-3)(x-y-3).$$ The degenerate conic $g(x,y)=0$ consists of the tangent lines through $P_1$ and $P_3$ (it’s the product of the equations of the lines). Every nontrivial linear combination of these two equations is itself a conic that passes through the two points and has the correct tangents at those points. Use Plücker’s mu to find the linear combination that also passes through $P_2$: $$f(P_2)g(x,y)-g(P_2)f(x,y) = -2(x+y-3)(x-y-3)-4((x+3)^2+y^2-18)=0$$ which simplifies to the equation $$3x^2+y^2+6x-9=0.$$ Happily, this is an ellipse. The gradient at $(1,0)$ is $(12,0)$, so the tangent at $P_2$ is vertical, as required. (As Blue noted in his comment, we didn’t need to use all three tangents to construct this ellipse.)