Diamond Problem Solver
If the product is 12 and the sum is 7, the two numbers are 3 and 4, because 3 times 4 is 12 and 3 plus 4 is 7. A diamond problem is a small puzzle used in algebra class to build the skill you need for factoring. The diamond has four spots. The top holds the product of two numbers, the bottom holds their sum, and the left and right hold the two numbers themselves. This solver works in both directions. You can enter the two numbers to check the product and sum, or you can enter the product and sum and let the tool find the pair of numbers that fits. The diamond problem shows up early in a factoring unit because it trains the exact thinking a student needs when breaking down a quadratic like x squared plus 7x plus 12. In that expression the last term is the product and the middle coefficient is the sum, so the numbers that solve the diamond are the same numbers that split the middle term. Practicing the diamond first makes the later factoring step feel familiar instead of new. Enter your values, read the pair of numbers, and use the worked steps to see how each answer was found.
Quick answer
The top of the diamond is the product, which means the two numbers multiplied together.
Two numbers
3 and 4
Product (top)
12
Sum (bottom)
7
Number 1
3
Number 2
4
What this tells you
- •The top of the diamond is the product, which means the two numbers multiplied together.
- •The bottom of the diamond is the sum, which means the two numbers added together.
- •The left and right of the diamond are the two numbers you are solving for.
- •When you know both numbers, multiply them for the product and add them for the sum.
- •When you know the product and sum, the two numbers are the solutions of x squared minus sum times x plus product equals 0.
- •Signs matter. A negative product means one number is positive and one is negative, and a negative sum means the numbers lean negative overall.
How to Use
- 11. Choose a mode. Pick I know both factors when you already have the two numbers, or I know the product and sum when you have the top and bottom of the diamond.
- 22. In factors mode, type the left number and the right number. The tool multiplies them for the product and adds them for the sum.
- 33. In product and sum mode, type the product for the top and the sum for the bottom. The tool finds the pair of numbers that multiply to the product and add to the sum.
- 44. Read the two numbers in the result, then check the product and sum values to confirm they match your diamond.
- 55. If the tool reports no real factors, it means no real number pair fits that product and sum, which happens when the sum is too small for the product.
How It Works
Formula
product = left x right
sum = left + right
x^2 - sum*x + product = 0
factors = (sum +/- sqrt(sum^2 - 4*product)) / 2The two numbers in a diamond problem are the roots of the quadratic x squared minus sum times x plus product equals 0. This comes straight from the diamond itself, because if the two numbers add to the sum and multiply to the product, they must satisfy that equation. To find them, use the quadratic formula. The value under the square root is the discriminant, sum squared minus 4 times product. When the discriminant is positive or zero, you get two real numbers, or one repeated number when it is exactly zero. When the discriminant is negative, no real pair exists. For example, with a product of 12 and a sum of 7, the discriminant is 49 minus 48, which is 1. The square root of 1 is 1, so the numbers are (7 minus 1) / 2 and (7 plus 1) / 2, which are 3 and 4.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
Find the numbers for product 12 and sum 7
The discriminant is 7 squared minus 4 times 12, which is 49 minus 48, or 1. The square root of 1 is 1, so the numbers are (7 minus 1) / 2 and (7 plus 1) / 2. That gives 3 and 4, which multiply to 12 and add to 7.
Find the numbers for product 24 and sum -11
The discriminant is (-11) squared minus 4 times 24, which is 121 minus 96, or 25. The square root of 25 is 5, so the numbers are (-11 minus 5) / 2 and (-11 plus 5) / 2. That gives -8 and -3, which multiply to 24 and add to -11.
Find the numbers for product -18 and sum 3
The discriminant is 3 squared minus 4 times -18, which is 9 plus 72, or 81. The square root of 81 is 9, so the numbers are (3 minus 9) / 2 and (3 plus 9) / 2. That gives -3 and 6, which multiply to -18 and add to 3.
Check the product and sum for factors 2.5 and 1.5
Diamond problems can use decimals. Multiply 2.5 by 1.5 to get the product 3.75, then add 2.5 and 1.5 to get the sum 4. This confirms the top and bottom of the diamond without any factoring.
Test product 10 and sum 1 for real factors
The discriminant is 1 squared minus 4 times 10, which is 1 minus 40, or -39. A negative discriminant means no real number pair multiplies to 10 and adds to 1, so the tool reports no real factors.
Common Diamond Problems
Practice pairs showing the product on top, the sum on the bottom, and the two numbers.
| Product (top) | Sum (bottom) | Number 1 | Number 2 |
|---|---|---|---|
| 12 | 7 | 3 | 4 |
| 12 | 8 | 2 | 6 |
| 15 | 8 | 3 | 5 |
| 24 | -11 | -8 | -3 |
| -18 | 3 | -3 | 6 |
| -24 | 5 | -3 | 8 |
| 36 | 13 | 4 | 9 |
| -40 | -3 | 5 | -8 |
Common mistakes
- Swapping the product and the sum. The top of the diamond is always the product and the bottom is always the sum, so entering them in the wrong spots gives the wrong pair.
- Getting the signs wrong. A negative product needs one positive and one negative number, while a negative sum pulls the pair toward negative values.
- Adding when you should multiply. The two numbers must multiply to the product, not add to it, so always test both conditions before you trust an answer.
- Guessing only whole numbers. Some diamond problems have decimal or irrational answers, and skipping those cases leads to a missed solution.
- Assuming every diamond has an answer. When the sum squared is smaller than 4 times the product, no real pair exists, and that is a valid result, not a mistake in your input.
Embed this calculator on your site
Drop this single line where you want the calculator to appear. It is responsive, mobile-friendly, resizes automatically, and is free to use with attribution.
<script src="https://calctide.com/embed.js" data-tool="diamond-problem-solver" async></script>Preview the embed at /embed/diamond-problem-solver/.