# What are the steps for factorizing $1 - ab - cd + abcd$?

I can see that $1 - ab - cd + abcd$ factors to $(1-cd)(1-ab)$ but only because I tried a lot of different factors in a trial and error method, so it took me a while. I was wondering what the pattern to observe is and what the general/efficient method for factoring something like this is?

-
$1-ab-cd-abcd$ does not factor to $(1-cd)(1-ab)$, because $(1-cd)(1-ab)=1-ab-cd+abcd$. – Florian Mar 21 '12 at 12:32
@Florian: Woops, typo. Thanks. (fixed) – stariz77 Mar 21 '12 at 12:34
how about 1(1-ab) - cd(1-ab); then factor out a (1-ab) to get (1-ab)(1-cd)? – Ben Mar 21 '12 at 12:41
I guess practice more problems then you'll see – Kirthi Raman Mar 21 '12 at 12:43
The pattern to observe would probably be $(1-x)(1-y)=1-x-y+xy$. – Dejan Govc Mar 21 '12 at 12:54

\begin{align*} 1 - ab - cd + abcd &= (1-ab) - (cd - abcd) \\ &= (1-ab) - cd(1 - ab) \\ &= (1-ab)(1-cd). \end{align*} The crucial steps are: finding groups that look very similar -- with a goal of factoring a gcd from each group. If each group now contains the same expression in parentheses, then that expression can be factored out.