# Factoring difference of squares: two variables

Video transcript
Factor x squared minus 49y squared. So what's interesting here is that well x squared is clearly a perfect square. It's the square of x. And 49y squared is also a perfect square. It's the square of 7y. So it looks like we might have a special form here. And to remind ourselves, let's think about what happens if we take a plus b times a minus b. I'm just doing it in the general case so we can see a pattern here. So over here, this would be a times a, which would be a squared plus a times negative b, which would be negative ab plus b times a or a times b again, which would be ab. And then you have b times negative b, so it would b minus b squared. Now these middle two terms cancel out. Negative ab plus ab, they cancel out and you're left with just a squared minus b squared. And that's the exact pattern we have here. We have an a squared minus a b squared. So in this case, a is equal to x and b is equal to 7y. So we have x squared minus 7y, the whole thing squared. So we can expand this as the difference of squares, or actually this thing right over here is the difference of squares. So we expand this like this. So this will be equal to x plus 7y times x minus 7y. And once again, we're just pattern matching based on this realization right here. If I take a plus b times a minus b, I get a difference of squares. This is a difference of squares. So when I factor it, it must come out to the result of something that looks like a plus b times a minus b or x plus 7y times x minus 7y.