I'm trying to come up with a general strategy for factoring expressions with four terms on the basis of the symmetries of the expressions. One thought I had was the following: count up the number of terms in which each variable appears, and compare.

For example, if I want to factor the expression $x^{2}-y^{2}-4x+4$, I could say that $x$ appears in two terms, and $y$ appears in only one term, and there is only one constant term. Since the two variables do not appear in the same number of terms, I would group by 1 and 3. So I would have $$x^{2}-4x+4-y^{2}=(x-2)^{2}-y^{2}=(x-2-y)(x-2+y).$$ On the other hand, suppose I had to factor the expression $2y-6-3x+xy$, I could note that $x$ and $y$ each appear in exactly two terms, so I should group by 2 and 2. Indeed, $$2y-6-3x+xy=2(y-3)+x(y-3)=(x+2)(y-3).$$ However, I find that this strategy does not always work. For example, suppose I have something like $x^{2}-2xy+y^{2}-9$. Even though $x$ and $y$ appear in the same number of terms, the correct thing to do here is $$x^{2}-2xy+y^{2}-9=(x-y)^{2}-3^{2}=(x-y-3)(x-y+3).$$ Can my strategy be salvaged? Is there a more general method than simply trial-and-error?

Important note: I am interested in basic techniques teachable in High School Algebra I.

  • $\begingroup$ I'm looking for ways to factor four-term expressions involving at most two variables, with the highest total power in any term equal to $2$. $\endgroup$ Commented Jul 22, 2013 at 15:16
  • $\begingroup$ Oh, whoops. Sorry about that. $\endgroup$
    – Potato
    Commented Jul 22, 2013 at 15:16
  • 1
    $\begingroup$ I will try to write something in a bit. (Which I promise will be better than my last comment.) $\endgroup$
    – Potato
    Commented Jul 22, 2013 at 15:17
  • $\begingroup$ Are $ax^2+by^2+cxy+d$ and $ay+bx+cxy+d$ the only two cases you need? $\endgroup$
    – Potato
    Commented Jul 22, 2013 at 15:19
  • $\begingroup$ Here's a few types: 1. $x^2-xy-x+y$, 2. $r^2-6r-9s^2+9$, 3. $u^2-4v^2+3u-6v$, 4. $a^2-b^2+ac-bc$, 5. $x^2-2x-4y^2-4y$, 6. $4-4x^2-4y^2+8xy$, 7. $9u^2-9v^2-36w^2+36vw$. $\endgroup$ Commented Jul 22, 2013 at 15:36

3 Answers 3


Your goal is possible (modulo your students' facility with algebra) via successive reductions. In case it's helpful to you conceptually, "secretly" you're diagonalizing a quadratic form in the plane, then completing the square, and factoring.

  • Let's say the original expression to be factored is $ax^2 + 2bxy + cy^2 + dx + ey + f$. (N.B. factor of $2$ in the $xy$ coefficient.) If $b = 0$, skip to the next step. If $b \neq 0$, calculate the "magic numbers" (eigenvalues of the quadratic form) $$g = (1/2)\Bigl(a + c + \sqrt{(a - c)^2 + 4b^2}\Bigr),\qquad h = (1/2)\Bigl(a + c - \sqrt{(a - c)^2 + 4b^2}\Bigr).$$ Introduce new variables $$x' = \frac{(h-a)x - by}{b(h-g)},\qquad y' = \frac{(-g+a)x + by}{b(h-g)}.$$ The expression to be factored now has the form $g(x')^2 + h(y')^2 + d'x' + e'y' + f$ for some numbers $d'$ and $e'$.

  • We may as well assume $gh < 0$: If $g = 0$ or $h = 0$, "inspection" succeeds; if $gh > 0$, the quadratic defines an ellipse, and does not factor over the reals. Complete the square with the $x^2$ and $x$ terms and with the $y^2$ and $y$ terms, obtaining new variables $x''$ and $y''$. The equation to be factored now has the form $g(x'')^2 + h(y'')^2 + f' = 0$ for some number $f'$. This equation factors as a difference of squares because $gh < 0$.

Naturally, I've made a good faith effort to eliminate algebra errors and typos, but it's a good idea to test a few examples before using this in class. :)

  • $\begingroup$ Very nice idea, but much too advanced for High School Algebra I students. In the USA, at least, this concept would be more Linear Algebra (sophomore college-level course). $\endgroup$ Commented Jul 22, 2013 at 16:45

I have two ideas. I have no experience as an educator, so I don't know if these will help. I will give a brief outline of each. Please request more detail if you think either will help you.

I think you should remind them, if you don't already, to be on the lookout for the easy degenerate factorizations, like factoring out a constant:


or factoring out a variable:


Idea 1.

Suppose the expression factors. The general form for any expression that you mention is


(This can proven by comparing degrees.)

You can then multiply this out and compare coefficients of this with the expression you want to factor. This sounds difficult, but a lot of it can be done mentally. For example, if we're factoring over the integers (and it appears you are), if the degree of the $x^2$ is $1$, we know $a=d=1$ immediately. You can do a lot of easy simplifications like this to make the work not so bad.

The advantage to this is that it will always find the factorization, if it exists. If it doesn't, you can prove this by examining the resulting equations and showing they have no solution. It's relatively simple and mechanical, and easily generalizes to higher degree expressions. However, it is a little time consuming, and perhaps error-prone, as there are a lot of multiplications. (However, a student can easily check their work by multiplying out the factorization they get and checking it against the original expression.)

Idea 2.

Your students already know how to factor quadratics in one variable, right? This isn't much different. You can view expressions like $x^2-y^2-4x+4$ as quadratics in $x$ whose coefficients are polynomials in $y$. Formally, this is the statement that $\mathbb Z[x,y]=(\mathbb Z[y])[x]$.

Let me do an example to make this clear. We can write $x^2-y^2-4x+4$ as


Note that I have grouped the terms so it looks like a polynomial in $x$.

Just as we usually factor quadratics, we want to find polynomials $a(x)$ and $b(x)$ so that $a+b=-4$ and $ab=4-y^2$. It's not too hard to see that $a=-(2-y)$ and $b=-(2+y)$ works (using the difference of squares factorization on $4-y^2$), and this gives


This agrees with your factorization above.

The possible problem I see with is that students may not be comfortable with the idea of polynomials as coefficients.


I will do your other two examples using the second method.


We group as before

$$x^2 - (2y)x + (y^2-9).$$

We want polynomials $a(x)$ and $b(x)$ such that $a+b=-2y$ and $ab=y^2-9$. Using the difference of squares factorization on $y^2-9$, we see that $a=-(y+3)$ and $b=-(y-3)$ work. We then obtain the factorization



We want to factor $2y-6-3x+xy$. This is a linear polynomial in $x$, so we write it as


Now we know the only way to factor linear polynomials $ax+b$ is to take a constant out of each term. Here 'constant' means 'polynomial in $y$.' This gives


as desired.

  • $\begingroup$ Both ideas are possible, I think. Idea 1 I could use for any Algebra I students, and I probably will, even though it doesn't make use of symmetries very much. Idea 2 might be challenging for slower students. How general would you say Idea 2 is? E.g., how many of my example problems would it solve? $\endgroup$ Commented Jul 22, 2013 at 16:51
  • 1
    $\begingroup$ @AdrianKeister I updated my answer with solutions to your two example questions. My second idea will work on any problem of this kind, but it might require a bit more creativity than the first. $\endgroup$
    – Potato
    Commented Jul 22, 2013 at 17:24
  • $\begingroup$ I'm liking your Idea 2 better and better. I might even be able to use that with the slower students! $\endgroup$ Commented Jul 22, 2013 at 18:46
  • $\begingroup$ Idea # 2 gets the bounty (unless someone else has a better way), as it worked on all examples, really without that much more effort than factoring normally takes. Thanks very much! $\endgroup$ Commented Jul 22, 2013 at 19:24
  • 1
    $\begingroup$ @AdrianKeister Indeed. I've fixed it. I'm really not sure why your edit was rejected. $\endgroup$
    – Potato
    Commented Aug 15, 2013 at 22:25

Factorization in $\mathbb{C}[x_1,x_2, .. .x_n]$ is polynomial-time given a suitable representation of the algebraic number coefficients.

Paper i'm quoting: http://www.aimath.org/pastworkshops/polyfactorrep.pdf

Paper that is cited: http://scholar.google.co.uk/scholar?cluster=697805526622901646&hl=en&as_sdt=0,5&sciodt=0,5

  • $\begingroup$ Hmm. I was looking more for techniques that would be appropriate to teach in High School Algebra I. I'll edit the question accordingly. $\endgroup$ Commented Jul 18, 2013 at 18:34
  • $\begingroup$ Also, I can't open the google.co.uk paper. $\endgroup$ Commented Jul 18, 2013 at 18:40
  • $\begingroup$ I've fixed that. $\endgroup$ Commented Jul 18, 2013 at 19:16
  • $\begingroup$ Your answer is not suitable for my purposes. Can you think about how I could teach this to high school students? $\endgroup$ Commented Jul 19, 2013 at 21:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .