freeCodeCamp/guide/english/mathematics/definition-of-factor/index.md

1.6 KiB

title
Definition of Factor

Definition of Factor

Factors are two numbers that we can multiply together to yield another number. For example, 2 * 10 = 20, so 2 and 10 are factors of 20.

Often in algebra, we want to factor out expressions. Take, (x^2 + 4x +3), in the form Ax^2+Bx+C in order to factor this by looking for two numbers that will multiply to equal C and add up to equal C. 3 and 4 add up to 4 and multiply to equal 3.

With this in mind, (x^2 + 4x +3) can be factored out into (x+3)(x+1).

A factor can be defined in 2 ways. The first is in multiplication. Take 3 * 4 = 12. Here 3 and 4 are factors, and together they make a product. Another way a factor can be defined is if the remainder upon division equals 0. Take the number 12. If we divide 12 by 4 12 / 4 = 3 The remainder is 0. There are no decimal spaces, and therefore 4 is a factor of 12. Likewise, if we do 12 / 3 = 4 we also get a remainder of 0. Therefore both 3 and 4 are factors of 12.

We can simplify this and use % as the modulo function. This will give us 12 % 3 = 0 Because the modulo function returns the remainder upon division, any number that returns 0 upon the use of modulo is a factor of the other number.

More Information:

Here's a link to a quick video explaining factoring numbers Learn more about factoring out expressions here