I have a system of two quadratic equations with unknowns $x$ and $y$:

$$a_{1 1} x y + a_{1 2} x^2 + a_{1 3} y^2 + a_{1 4} x + a_{1 5} y + a_{1 6} = 0,\\ a_{2 1} x y + a_{2 2} x^2 + a_{2 3} y^2 + a_{2 4} x + a_{2 5} y + a_{2 6} = 0,$$

where $a_{i j}$ are arbitrary scalars.

Is there an algebraic solution of the above system?

  • 1
    $\begingroup$ easy case would be ,if we could complete square in each equation,get similar to circle equation $\endgroup$ Jul 26, 2012 at 9:06
  • $\begingroup$ So you have two conic sections that cut each other and you are looking for the cut points? $\endgroup$
    – draks ...
    Jul 26, 2012 at 9:11
  • $\begingroup$ Yes, I have tho conics and I am looking for the intersercion points. $\endgroup$
    – tomto
    Jul 26, 2012 at 9:32

2 Answers 2


From Intersecting two conics:

The solutions to a two second degree equations system in two variables may be seen as the coordinates of the intersections of two generic conic sections. In particular two conics may possess none, two or four possibly coincident intersection points. The best method of locating these solutions exploits the homogeneous matrix representation of conic sections, i.e. a 3x3 symmetric matrix which depends on six parameters. The procedure to locate the intersection points follows these steps:

  • given the two conics $C_1$ and $ C_2$ consider the pencil of conics given by their linear combination $\lambda C_1 + \mu C_2$
  • identify the homogeneous parameters $(\lambda,\mu)$ which corresponds to the degenerate conic of the pencil. This can be done by imposing that $\det(\lambda C_1 + \mu C_2) = 0$, which turns out to be the solution to a third degree equation.
  • given the degenerate conic $C_0$, identify the two, possibly coincident, lines constituting it
  • intersects each identified line with one of the two original conic; this step can be done efficiently using the dual conic representation of $C_0$
  • the points of intersection will represent the solution to the initial equation system
  • $\begingroup$ Ah, yes, that's another nice way to solve it! $\endgroup$ Jul 26, 2012 at 10:11
  • $\begingroup$ @darks: Thank you very much! I think it is a good solution for me. I have only one question: If I compute coeficients of the degenerate conic $C_0$ the question is how to compute parameters of the lines? I have a solution but it is not elegant: For example I fix $x$ for some value and calculate $y$ from $C_0$. I repeat the procedure for some other value of $x$. I calculate lines parameters from these points. Is there any better (more elegant) solution? $\endgroup$
    – tomto
    Jul 27, 2012 at 7:16
  • $\begingroup$ @draks ... I am also curious about this. How would one programatically find the lines that constitute a degenerate conic (i.e. without completing the square by hand, etc.)? $\endgroup$ Mar 5, 2013 at 17:27

Each equation describes a conic. Thus, you are trying to compute the intersection $\cal C_1\cap\cal C_2$ of two conics. In general, you have to expect four intersection points (e.g., think of two ellipses meeting transversally).

There are special cases where the task is simplified. For instance, if one of the two conics splits as the union of two lines, or if one of the equations reduces easily to the form $y=f(x)$.

In the general case you can either try Elimination Theory or you can exploit the fact that conics are rational curves, i.e. that there is a parametrization $$ \Bbb R\ni t\mapsto (x(t),y(t))\in\cal C_1\qquad(*) $$ given by rational functions, i.e. quotient of polynomials in $t$. Then if you plug this "rational description" of $\cal C_1$ into the equation of $\cal C_2$ will eventually get a polynomial equation of degree 4 in the variable $t$ only, whose solutions correspond to the intersection points. In order to solve this degree 4 equation you need either some luck, or some patience to go browsing old Algebra books.

In order to get (*), the usual method is to find just one point $(x_o,y_o)\in\cal C_1$, consider the lines $$ \ell_t: y=t(x-x_o)+y_o $$ through it and describe the second intersection of $\cal C_1\cap\ell_t$ in terms of $t$.

  • $\begingroup$ Andrea, thank you for your answer. I will try to follow your advices. But the most I need is an exact formula, how to solve this problem. This formula can be complicated - this is not problem for me because I plan to put this formula to a computation algorithm. $\endgroup$
    – tomto
    Jul 26, 2012 at 9:51
  • $\begingroup$ @user36556: A final formula that includes all cases might be very very complicated. In any event the procedure to get the intersection point can certainly be translated into an effective algorithm, and I'm sure that it already has. $\endgroup$ Jul 26, 2012 at 9:59
  • $\begingroup$ Maybe the formula that I am looking for can be generated by some algebra software (for example Matlab Symbolic Toolbox)? Actualy I don't have access to such software or I don't have knowledge about free software substitutes. $\endgroup$
    – tomto
    Jul 26, 2012 at 10:01
  • $\begingroup$ I'm not an expert in symbolic computation software. I do use occasionally Maple just because my institution purchased a licence. What software is best to use for the case in question may be subject of another question here. $\endgroup$ Jul 26, 2012 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.