Given a quadratic curve $\mathcal{C}: X^2+2XY+4Y^2-2X+6Y+6=0$, determine its type and find the equation of the tangents to $\mathcal{C}$ through the point $(-7,1)$.
So far I've written the matrix of $\mathcal{C}$ as $$A = \begin{bmatrix}6 & -1 & 3 \\ -1 & 1 & 1 \\ 3 &1 &4\end{bmatrix}.$$
I used the fact that $\det A\neq 0$ and $\begin{vmatrix}1 & 1 \\ 1 & 4\end{vmatrix}>0$ to say that this is an ellipse, by some theorems we did in class. Now I know that if a point $P(x,y)$ is on the curve, then the unique tangent at this point is the polar line which would be calculated by taking the homogeneous vector of $P$ and multiplying it by A as follows $(1:x:y)A$. However $(-7,1)$ is not on the curve although I calculated $x=\frac{16}{7}$ to be its tangent if it was. so I am stuck here. What could I use to find the tangents since the point is not on the curve? If we write $t_P: y=ax+b$ then $t_P$ must contain $P$ and intersect $\mathcal{C}$ at a point, but I am not sure what point that would be.
The first example has been treated.
Let us consider the second example you have given in one of your comments:
$$x^2-xy-y^2-2x+2y+1=0 \tag{1}$$
(which is a hyperbola: see figure below) with point $P(4,-2)$.
The generic parametric equations of lines passing through point $P$ are:
$$\begin{cases}x&=& \ \ \ 4+at\\y&=&-2+bt\end{cases}$$
If we substitute them in (1), we obtain the following quadratic equation in variable $t$:
$$(a^2 - ab - b^2)t^2 + 2(4a + b)t + 9=0$$
Its discriminant is, up to an unimportant factor $4$, equal to :
$$\Delta=(4a + b)^2-9(a^2 - ab - b^2)$$
$$\Delta=7a^2 + 17ab + 10b^2\tag{2}$$
Setting $\Delta=0$ is expressing that there is a double root, a fact characterizing a tangent line.
Let us take arbitrarily $a=1$ in (2). The two possible roots of quadratic equation obtained from (2)
$$7 + 17b + 10b^2=0$$
are $b=-1$ and $b=-0.7$ ($b$ is in fact plainly the slope of the straight lines)
Therefore the two parametric equations of tangent lines issued from point $P(4,-2)$ are:
$$\begin{cases}x&=& \ \ \ 4+t\\y&=&-2-t\end{cases} \ \text{and} \ \begin{cases}x&=&\ \ \ 4+t\\y&=&-2-0.7t\end{cases}$$
otherwise said, with resp. cartesian equations:
$$x+y=2 \ \ \ \ \text{and} \ \ \ \ 7x+10y=8$$