# Why does the "T=0" method to calculate tangent work?

Given a random equation of a curve: $ax^2 + 2hxy + by^2 + 2gx + 2fy + c = 0$.
Suppose we need to find the tangent to this curve at any point $A(x_1, y_1)$. A method given to me by my professor was the 'T' method:

The 'T' form of an equation can be obtained by replacing:
$$x^2 \rightarrow xx_1$$ $$y^2 \rightarrow yy_1$$ $$x \rightarrow \frac{x + x_1}{2}$$ $$y \rightarrow \frac{y + y_1}{2}$$ $$xy \rightarrow \frac{xy_1 + x_1y}{2}$$

The tangent to the curve is then the equation $T=0$.

For instance, if we need to find the tangent at $(2, 2)$ to the parabola $y^2 - 2x=0$:
$T =0$: $\implies yy_1 - 2\frac{x+x_1}{2} = 0$

Substituting $x_1 = 2$ and $y_1 = 2$: $$2y - (x+2) = 0$$ $$\implies 2y - x = 2$$

which is the required tangent.

I don't understand how this works! Could someone help me understand why it does?

This also works for other cases like:

• Deriving the equation of the two tangents to a curve from a certain external point: $SS_1 = T^2$ (S is the equation of the curve and S1 is the value given by the equation when the point is substituted into it (the power of the point wrt the curve))

While geodude's method works, I'm putting up my calculus version of the problem.

Taking the random curve: $ax^2 + 2hxy + by^2 + 2gx + 2fy + c = 0$

Differentiating it wrt x: $$2ax + 2hx\frac{dy}{dx} + 2hy + 2by\frac{dy}{dx} + 2g + 2f\frac{dy}{dx} = 0$$ $$\implies (ax + hy + g) + \frac{dy}{dx}(hx + by + f) = 0$$ $$\implies \frac{dy}{dx} = -\frac{(ax + hy + g)}{(hx + by + f)}$$

The equation of the tangent at the point $(x_1, y_1)$ is: $(y-y_1) = \frac{dy}{dx} (x - x_1)$

$$\implies (y-y_1)(hx+by+f) = (x_1 - x)(ax + hy + g)$$ $$\implies hxy + by^2 + fy -hxy_1 - byy_1 - fy_1 = axx_1 + hyx_1 + gx_1 - ax^2 - hxy - gx$$

Rearranging: $$ax^2 + by^2 + 2hxy + gx + fy = axx_1 + hyx_1 + gx_1 + hxy_1 + byy_1 + fy_1$$

Adding $gx + fy + c$ on both sides: $$ax^2 + by^2 + 2hxy + 2gx + 2fy +c = axx_1 + hyx_1 + gx_1 + hxy_1 + byy_1 + fy_1 +gx + fy + c$$

The LHS is $0$.

$$\therefore axx_1 + 2h\bigg(\frac{x_1y + xy_1}{2}\bigg) + byy_1 + 2g\bigg(\frac{x_1 + x}{2}\bigg) + 2f\bigg(\frac{y + y_1}{2}\bigg) + c = 0$$

Which is the "T" form of the equation.

• Yep, you got it. Commented Mar 22, 2014 at 15:32
• What if $hx+by+f=0$ at $x=x_1,y=y_1$? Commented Nov 15, 2020 at 3:27
• Unfortunately your solution is incorrect because of the fact that rather than using $(x_1,y_1)$ in calculation of $\frac{dy}{dx}$, you kept it in terms of general (x,y) (you confused a particular point on the curve and a general point in space or you used same variables for two different points). I have posted my explanation and the correct solution for the approach you want. Also @SufaidSaleel I have answered your question in my post. Check it out and tell me if you find an issue Commented Nov 21, 2023 at 6:31

First of all, you probably know that the tangent at $x_0$ of the parabola $y=ax^2$ is: $$y = ax_0^2 + 2ax_0(x-x_0).$$

If you didn't know this, keep reading! This means that, if we stay "close enough" to $x_0$, the line above is the one that approximates best the direction of the parabola.

In particular, if we move from $x_0$ to $x_0 + \Delta x$, we get: $$a(x_0+\Delta x)^2 = ax_0^2 + 2ax_0\Delta x + a(\Delta x)^2.$$

You see that if $\Delta x$ is very small, the last term tends to vanish, and $$a(x_0+\Delta x)^2 \approx ax_0^2 + 2ax_0\Delta x$$

becomes a very good approximation. Since $\Delta x = x-x_0$, the equation of the line given by: $$y = ax_0^2 + 2ax_0(x-x_0)$$

is the equation of our desired tangent.

Your "T-formula" implies that a curve $C$ with equation: $$ax^2 + 2hxy + by^2 + 2 gx +2 fy + c =0$$

has tangent $T$ in $(x_0,y_0)$: $$axx_0 + h(xy_0+x_0y) + byy_0 + g(x+x_0) + f(y+y_0) +c=0.$$

We would like to show now that $T$ is tangent, that is, that $T$ is the best possible approximation of $C$ if we stay "close enough" to the point.

If we move from $(x_0,y_0)$ to $(x_0+\Delta x, y_0+\Delta y)$, like before, we get: $$a(x_0+\Delta x)^2 + 2h(x_0+\Delta x)(y_0+\Delta y) + b(y_0+\Delta y)^2 + 2 g(x_0+\Delta x) +2 f(y_0+\Delta y) + c =0.$$

Expanding the products: $$\begin{array}{c} a(x_0^2+2x_0\Delta x+\Delta x^2)+ \\ + 2h(x_0y_0+\Delta xy_0+x_0\Delta y+\Delta x\Delta y)+ \\ + b(y_0^2+2y_0\Delta y+\Delta y^2)+ \\ + 2 g(x_0+\Delta x) +\\ +2 f(y_0+\Delta y) + c =0. \end{array}$$

Like before, we can neglect the quadratic "small" terms to get a linear equation, which approximates our curve in the best way possible. We obtain: $$\begin{array}{c} a(x_0^2+2x_0\Delta x) + 2h(x_0y_0+\Delta xy_0+x_0\Delta y) + b(y_0^2+2y_0\Delta y)+ \\ + 2 g(x_0+\Delta x) +2 f(y_0+\Delta y) + c =0. \end{array}$$

To get the equation in $x,y$ for the line, we must (like before) replace $\Delta x$ with $(x-x_0)$, and now also $\Delta y$ with $(y-y_0)$. So: $$\begin{array}{c} a(x_0^2+2x_0(x-x_0)) + 2h(x_0y_0+(x-x_0)y_0+x_0(y-y_0)) + b(y_0^2+2y_0(y-y_0))+ \\ + 2 g(x_0+x-x_0) +2 f(y_0+y-y_0) + c =0. \end{array}$$

Summing, we get: $$\begin{array}{c} a(-x_0^2+2x_0x) + 2h(-x_0y_0+xy_0+x_0y) + b(-y_0^2+2y_0y)+ \\ + 2 gx +2 fy + c =0. \end{array}$$

This is an equation for the line, but we still haven't used the fact that the line must pass through our point $(x_0,y_0)$. Or, we still have to ensure that $(x_0,y_0)$ satisfies the equation for $C$. Now, we rewrite the expression above in the following way (we have moved the terms in $a,h,c$, and added and subtracted the terms in g,f,c): $$\begin{array}{c} a(2x_0x) + 2h(xy_0+x_0y) + b(2y_0y) + g(x +x_0) + f(y+y_0) + 2c +\\ -(ax_0^2+2hx_0y_0+by_0^2+gx_0+fy_0+c) =0. \end{array}$$

Saying that $(x_0,y_0)$ passes through $C$ is saying that the second line vanishes! So we are finally left with: $$2ax_0x + 2h(xy_0+x_0y) + 2by_0y + g(x +x_0) + f(y+y_0) + 2c =0.$$

Dividing both sides by $2$, we get exactly your formula.

(Yes, it is a rather long and complicated process. I can't come up with a simpler one that doesn't lose clarity and doesn't use advanced calculus. This is probably why they never prove it in high school! Anyway, I'd be very very happy to see a shorter, elementary proof.)

• Ah, so it was basically just taking an infinitesimally small increment in the coordinates. Thanks a lot! I'd like to see the calculus proof as well. Hopefully it isn't above my level right now. Commented Mar 22, 2014 at 10:59
• @mikhailcazi Try yourself with calculus! You probably recognized that what I did with the $\Delta x$ is exactly differentiation. First try to find the tangent to $y=ax^2$ by deriving. Then try with the general formula. If you have trouble, ask again! Commented Mar 22, 2014 at 11:10
• Haha, since you said 'advanced calculus', I thought it may be something above what I've learnt till date. I surely will try, though. :) Commented Mar 22, 2014 at 11:24
• @mikhailcazi It's because I think you can use more advanced methods than simple derivatives, to shorten the proof. Anyway, with simple derivatives, remember that the equation of the tangent is $(y-y_0)/(x-x_0)=dy/dx$ (can you see why?). Commented Mar 22, 2014 at 11:27
• Oh, that was really easy. Just differentiate, rearrange and you get it. I feel stupid that I even asked this question. xD Haha :P Tried for a random curve $ax^2 + by^2 + ....$ too; it was lengthy but worked out in the end. Commented Mar 22, 2014 at 11:57

Replying to OP's answer: (let us keep the original 2 degree curve equation to be S and when you substitute ($$x_1,y_1$$), let it be be $$S_1$$). Also, I am pretty sure OP might have understood his mistake till now, but just for clarification, his solution is incorrect. In his solution, he has taken $$\frac{dy}{dx}$$ to be in terms of x,y and substituted them in the equation $$(y-y_1) = \frac{dy}{dx}(x-x_1)$$, while you have to substitute them in terms of $$(x_1,y_1)$$, what I mean is that they should not be kept in general terms (x,y) (line equation contains y = mx+c where (x,y) are general points on line) and should be dependent upon point of contact of tangent to the curve. He then proceeded to open the equation $$(y-y_1) = \frac{dy}{dx}(x-x_1)$$ where $$\frac{dy}{dx}$$ was still in (x,y) terms and then added gx + fy + c on both sides and used $$S_1 = 0$$, which is wrong because gx + fy + c is a general point in 2D space and not necessarily on the curve (because he confused $$(x_1,y_1)$$ with (x,y) in the original portion of the equation $$((y-y_1) = \frac{dy}{dx}(x-x_1))$$ he could successfully do this and get the final answer as $$T = 0)$$; The real solution is along the same lines:

$$\frac{dy}{dx} = -\frac{(ax_1 +hy_1 + g)}{(hx_1 + by_1 + f)}$$

Then using $$(y-y_1) = \frac{dy}{dx}(x-x_1)$$ and opening up the equation, we get: $$hyx_1 + byy_1 + fy - hx_1y_1 - b(y_1)^2 - fy_1 = -axx_1-hxy_1-gx+a(x_1)^2 + hx_1y_1 + gx_1$$

Rearrange to get $$axx_1 + byy_1 + hxy_1 + hyx_1 + gx + fy = a(x_1)^2 + b(y_1)^2 + 2hx_1y_1 + gx_1 + fy_1$$

Now you can add $$gx_1 + fy_1 + c$$ (on both sides as they are constants) to get (by using $$S_1$$ = 0) $$T = 0$$;

As for the comment below OP's answer by @Sufaid Saleel as to what would happen if $$hx_1 + by_1 + f = 0$$ (then we obviously cannot divide by it to get $$\frac{dy}{dx} = -\frac{(ax_1 +hy_1 + g)}{(hx_1 + by_1 + f)}$$

So what we could do is take 2 cases, one where $$ax_1 + hy_1 + g = 0$$ and one where it is $$\neq 0$$ :

For the first case, a little bit of manipulation(multiplying first equation by $$x_1$$ and second equation by $$y_1$$ and adding and using $$a(x_1)^2 + b(y_1)^ + 2hx_1y_1 .. = 0$$ (this allows for more cases like $$x_1 = 0 \& y_1 = 0$$ and stuff like that, but they are cases which can be easily solved) shows that Δ of the given equation is $$0$$, implying that this is a pair of straight lines and you successfully found out the point of intersection of the two line $$(x_1,y_1)$$ (as you set both $$\frac{∂S}{∂x}$$ and $$\frac{∂S}{∂y} = 0$$ which gives the centre of the conic (or if it is a pair of straight lines - the point of intersection of both lines))

If $$ax_1 + hy_1 + g \neq 0 \implies$$ there is a vertical tangent to the curve at that point (as the equation $$ax_1 + hy_1 + g + \frac{dy}{dx}(by_1 + hx_1 + f)$$ has to be equal to $$0$$ at that point, but the term with $$\frac{dy}{dx} = 0 \implies \frac{dy}{dx}$$ has to be ∞ (positive or negative) (like the curve $$2x^2 + 2y^2 + 6xy + 3x + 2y + 3 = 0$$ has a vertical tangent at (-1,1)).