If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Perfect square factorization intro

When an expression has the general form a²+2ab+b², then we can factor it as (a+b)². For example, x²+10x+25 can be factored as (x+5)². This method is based on the pattern (a+b)²=a²+2ab+b², which can be verified by expanding the parentheses in (a+b)(a+b).

Want to join the conversation?

  • blobby green style avatar for user jessica.187547
    Where in life do I use this
    (52 votes)
    Default Khan Academy avatar avatar for user
  • duskpin ultimate style avatar for user Natasha Jean-Francois
    at - he said something about FOIL whats that?
    (11 votes)
    Default Khan Academy avatar avatar for user
    • primosaur seed style avatar for user Ian Pulizzotto
      FOIL is one way for students to remember how to multiply two binomials.
      F means first, O means outer, I means inner, and L means last.
      Example: suppose we want to find (3x + 5)(2x - 7).
      First is (3x)(2x) = 6x^2.
      Outer is (3x)(-7) = -21x
      Inner is (5)(2x) = 10x.
      Last is (5)(-7) = -35.

      Now we add these four products to get 6x^2 - 21x + 10x - 35 = 6x^2 - 11x - 35.

      It is optional to use FOIL to remember how to multiply two binomials. Personally, I don't think of it so much as FOIL. Rather, I use the concept of multiplying each term in the first binomial by each term in the second binomial, then adding the products. This concept that I use to multiply two binomials easily extends to multiplying polynomials with more than two terms and/or multiplying more than two polynomials at a time, whereas FOIL does not easily extend beyond multiplying two binomials.
      (32 votes)
  • starky tree style avatar for user kristofer
    what is the foil technique?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • primosaur ultimate style avatar for user Landen
      It stands for First, Outside, Inside, Last. What you do is multiply the First terms, Outside terms, Inside terms, and Last terms like so: (3x+2y) (4x+y). You multiply 3x*4x (first) then 3x*y (outside), 2y*4x (inside) and (last) 2y*y. Then you add it all together and get your answer.

      For more clarification go to Sal's video: https://youtu.be/ZMLFfTX615w

      Hope this helps!
      (6 votes)
  • leafers sapling style avatar for user Kyle E
    Perfect square trinomials are so far pretty confusing to me. For ones with a leading coefficient of 1, it looks like you could just factor it like any other trinomial (using the X method).
    When it comes to perfect square trinomials with leading coefficients greater than 1, I've been getting really confused by all of the explanations I've seen. It looks like regular solving except off and confusing, with very little process.
    (3 votes)
    Default Khan Academy avatar avatar for user
    • stelly blue style avatar for user Kim Seidel
      For a lead coefficient that is not 1, you can factor by grouping.

      This video is trying to show you that there is a pattern that you can use to factor a perfect square trinomial.
      -- If you multiply: (a+b)^2, you always get: a^2+2ab+b^2
      -- You can leverage that pattern to reverse the process.

      Start with: a^2+2ab+b^2
      Let's use a specfic example: 4x^2+20x+25
      -- Is 4x^2 a perfect square? Yes! It is (2x)^2. So "a" in the pattern is "2x".
      -- Is 25 a perfect square? Yes! It is 5^2. So "b" in the pattern is "5".
      --I then always check the middle term to confirm I have a perfect square trinomial. Does 2ab = 20x? Remember, a=2x; b=5. So 2ab = 2(2x)(5) = 20x. We're good.
      -- So, what are the factors? They have to be (a+b)(a+b) or (a+b)^2. Plug in your values for "a" and "b" and the factors are (2x+5)^2

      Hope this helps.
      (3 votes)
  • blobby green style avatar for user feliciaab
    If I have a trinomial that is 25n^2 - 10n + 1 is that still a perfect square?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user Parth363
    How did he go from x^2+6x+9 to (x+3)^2
    (4 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Zedekiahh
      he found the numbers that multiply to nine, and add to six. since the signs found in the polynomial are both addition signs that means that the polynomial is positive. That means you can make (x+3)(x+3). if you factor that out you find that you x^2+6x+9. when you square a number you are just taking that number and multiplying t by it self. so (x+3)(x+3) = (x+3)^2. : )
      (0 votes)
  • piceratops tree style avatar for user ebuka.alozie
    what grade math is this 10th or 11th grade?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • female robot ada style avatar for user NiniNini
    In this video, he says Dos, means difference of squares. is that the same this as difference of Two squares, or DOTS?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • mr pink green style avatar for user David Severin
      Where does Sal use DOS in the video? Does your teacher use DOTS? I could be wrong, but I do not think Sal uses either DOS or difference of squares, I think his normal terminology is Difference of Perfect Squares. The perfect square concept is important because we could factor any squares, but perfect squares get whole numbers. So I could say that x^2 - 3 factors to (x + √3)(x - √3) which is correct and the difference of squares, but includes irrational numbers in the factors.
      (2 votes)
  • leafers ultimate style avatar for user Andrew Escobedo
    How much time do you really save using this method? I mean, I really don't mind doing it the long way so why is this useful to know?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • blobby blue style avatar for user smithc638
    i have no idea what is goining on rn
    (2 votes)
    Default Khan Academy avatar avatar for user

Video transcript

- [Narrator] We're going to learn to recognize and factor perfect square polynomials in this video. So for example, say I have the polynomial x squared plus six x plus nine. And then someone asks you, "Hey, can you factor this "into two binomials?" Well, using techniques we learned in other videos, say, "Okay, I need to find two numbers "whose product is nine and whose sum is six." And so I encourage you to pause this video and say, "Well, what two numbers can add up to six, "and if I take their product I get nine?" Well, nine only has so many factors, really one, three, and nine. And one plus nine does not equal six. And so, and negative one plus negative nine does not equal six. But three times three equals nine, and three plus three does equal six. Three times three, three plus three. And so we can factor this as x plus three times x plus three, which is of course the same thing as x plus three squared. And so what was it about this expression that made us recognize, or maybe now we will start to recognize it as being a perfect square? Well, I have of course some variable that is being squared, which we need. I have some perfect square as a constant, and that whatever is being squared there, I have two times that as the coefficient on this first degree term here. Let's see if that is generally true. And I'll switch up the variables just to show that we can. So let's say that I have a squared plus 14 a plus 49. So a few interesting things are happening here. All right, I have my variable squared. I have a perfect square constant term, that is seven squared right over here. And my coefficient on my first degree term here that is two times the thing that's being squared. That is two times seven, or you can say it's seven plus seven. So you can immediately say, "Okay, "if I want to factor this, "this is going to be a plus seven squared." And you can of course verify that by multiplying out, by figuring out what a plus seven squared is. Sometimes when you're first learning this, you're like, "Hey, isn't that just a squared "plus seven squared?" No! Remember, this is the same thing as a plus seven times a plus seven. And you can calculate this by using the foil, F-O-I-L technique. I don't like that so much because you're not thinking mathematically about what's happening. Really you just have to do distributive property twice here. First you can multiply a plus seven times a. So a plus seven times a. And then multiply a plus seven times seven. So plus a plus seven times seven, and so this is going to be a squared plus seven a, plus, now we distribute the seven. Plus seven a plus 49. So now you see where that 14 a came from. It's from the seven a plus the seven a. You see where the a squared came from. And you see where the 49 came from. And you can speak of this in more general terms. If I wanted to just take the expression a plus b and square it, that's just a plus b times a plus b, and we do exactly what we did just here, but here I'm just doing in very general terms with a or b and you can think of a as either a constant number or even a variable. And so this is going to be, if we distribute this, it's going to be a plus b times that a plus a plus b times that b. And so this is going to be a squared, now I'm just doing the distributive property again. A squared plus ab plus ab plus b squared. So it's a squared plus two ab plus b squared. So this is going to be the general form. So if a is the variable, which was x, or a in this case, then it's just going to be whatever squared and the constant term is going to be two times that times the variable. And I want to show that there's some variation that you can entertain here. So if you were to see 25 plus 10x plus x squared, and someone wanted you, said "Hey, why don't you factor that?" we could say, "Look, this right here is a perfect square. "It's five squared. "I have the variable squared right over here, "and then this coefficient on our first degree term "is two times five." And so you might immediately recognize this as five plus x squared. Now of course you could just rewrite this polynomial as x squared plus 10 x plus 25 in which case you might say, "Okay, variable squared, "some number squared, five squared, "two times that number is the coefficient here. "So that's going to be x plus five squared." And that's good because these two things are absolutely equivalent.