# Can $A^2+B^2+C^2-2AB-2AC-2BC$ be a perfect square

I have come upon the equation $A^2+B^2+C^2-2AB-2AC-2BC$ and want to factor it. Because of the symmetry, I am wondering if it can be a perfect square or if there is some other nice factorization.

• "if it can be a perfect square" - maybe for some values of A, B, and C... ; "...if there is some other nice factorization." - I don't see any; the cross terms are troublesome. Aug 1 '11 at 7:20
• Have you considered $ABC = 0$? Aug 1 '11 at 7:56
• You can always factor it by considering it as a polynomial in one of the variables, but the resulting factorization isn't exactly nice; for instance, with respect to $A$, $$\left(A-\left(B+C+2\sqrt{BC})\right)\right)\left(A-\left(B+C-2\sqrt{BC})\right)\right)\;.$$ Aug 1 '11 at 7:56

As is noted in other comments and answer, the symmetry is a little illusory because of the signs. This is probably less than you were hoping for, but or any integral choice of $B$ and $C$, you can find an integer $A$ which makes the expression a perfect square. Just take $A = 2(B+C)$, and the expression equates to $(B-C)^2$.

A more symmetric factorization would be:

$$A^2 + B^2 + C^2 - 2AB -2AC - 2BC =$$ $$(A + B + C)^2 - 4AB - 4AC - 4BC =$$ $$(A + B + C - 2 \sqrt{AB + AC + BC}) (A + B + C + 2 \sqrt{AB + AC + BC})$$

if $$AB + AC + BC \ge 0$$

\begin{align} & \left(\sqrt{a}+\sqrt{b}+\sqrt{c}\right)\left(-\sqrt{a}+\sqrt{b}+\sqrt{c}\right)\left(\sqrt{a}-\sqrt{b}+\sqrt{c}\right)\left(\sqrt{a}+\sqrt{b}-\sqrt{c}\right) \\ & = 2ab+2ac+2bc -a^2 - b^2 - c^2. \end{align}

You can use Wolfram Alpha to get some alternative forms

The first two listed are $$(A-B-C)^2-4BC$$ $$A^2-2A(B+C)+(B-C)^2$$

As J.M. says, it will all depend on the value of $A,B$ and $C$