Factoring is the reverse process of expanding. Instead of multiplying terms together, factoring takes an expanded polynomial and breaks it down into a product of simpler linear or quadratic factors.
For example:
$$x^2 + 5x + 6 = (x + 2)(x + 3)$$
A difference of two squares:
$$x^2 - 16 = (x - 4)(x + 4)$$
Or cubic polynomials:
$$x^3 - x = x(x - 1)(x + 1)$$
In CodeByMath, we use the factor("...") function to find these factors automatically.
Move the mouse over a dotted box for more information.
If a polynomial cannot be factored further over the integers, the function will return the original expression.
Now you try.
Try factoring x^2 - 7*x + 12 and x^3 - 4*x.
Type your code here:
See your results here:
Share your code
Show a friend, family member, or teacher what you've done!
Here is a share link to your code:
Need a hint?
💡 What now?
Factoring quadratic and cubic polynomials by hand can be challenging. The factor() function finds all polynomial roots and produces irreducible factors over the integers.