There are several methods and variations of these basic methods for factoring quadratics. If we start from a product of the form `(x+a)(x+b)` and expand it, we get
Notice that the coefficient of `x`, which is `a+b,` is the sum of the two numbers `a` and `b` and the constant term is the product of `a` and `b.` Thus, considering your example of `x^2-4x+4,` if we can find two numbers `a` and `b` that add to `-4` and multiply to `4,` we can work from right to left in equation (1). In fact, we can set `a=-2,` `b=-2,` since `-2+(-2)=-4` and `(-2)(-2)=4.`
This proves that `x^2-4x+4=(x-2)(x-2).`
Your second example is a little more complicated because the coefficient of `x^2` is no longer `1.` However, we can do something similar.
Here, notice that the coefficient of `x` , which is `ad+bc,` is the sum of two numbers `ad` and `bc,` while the product of the coefficients of `x^2` and the constant term (this product being `adbc)` is equal to the product of these two numbers. So in your example of `2x^2-5x-3,` we look for two numbers that multiply to `-3*2=-6` and add to `-5.` A little trial and error shows that `-6` and `1` are two such numbers. Now break up the `x` term into these two numbers as follows:
`2x^2-5x-3=2x^2-6x+x-3.` Now we can factor by grouping. I placed parentheses to make it clearer
Like I said, there are variations of these methods. One guaranteed method that will never require trial and error and work every time is to just use the quadratic formula. If we use the quadratic formula on
`2x^2-5x-3,` we see that the zeros are `-1/2` and `3,` so `(x+1/2)` and `(x-3)` are factors of this quadratic. The leading coefficient is `2,` so we put a `2` in front and get