Diamond problems are a favorite pre-algebra puzzle: a diamond is divided into four sections, two numbers go on the sides, their product goes on top and their sum goes on the bottom. Usually you are given the top and bottom and asked for the sides, which is exactly the skill needed to factor quadratic expressions. This solver handles that case and the three easier ones.
How to use the diamond problem solver
- Choose what you know: the product and sum, both side numbers, one side and the product, or one side and the sum.
- Enter the values. Negative numbers and decimals are allowed.
- The tape lists all four parts of the diamond, the steps explain how the missing values were found, and the diagram fills in the diamond with the unknown values in blue.
How to solve each type
Product and sum known (the classic puzzle)
List the factor pairs of the product, including negative pairs, and add each pair until one matches the sum.
Both side numbers known
Multiply them for the top, add them for the bottom.
One side and the product known
Divide: the other side is P ÷ x. Then add for the bottom.
One side and the sum known
Subtract: the other side is S − x. Then multiply for the top.
Worked example: product −24, sum 5
The product is negative, so the two numbers have opposite signs. Check the factor pairs of −24:
| Pair | Sum | Pair | Sum |
|---|---|---|---|
| −1 × 24 | 23 | 1 × −24 | −23 |
| −2 × 12 | 10 | 2 × −12 | −10 |
| −3 × 8 | 5 ✓ | 3 × −8 | −5 |
| −4 × 6 | 2 | 4 × −6 | −2 |
The side numbers are 8 and −3. Check: 8 × (−3) = −24 and 8 + (−3) = 5.
Sign shortcuts
| Product | Sum | The two numbers are… |
|---|---|---|
| positive | positive | both positive |
| positive | negative | both negative |
| negative | positive | opposite signs; the positive one is larger |
| negative | negative | opposite signs; the negative one is larger in size |
These shortcuts cut the list of factor pairs in half before you start.
Connection to factoring
A trinomial x² + bx + c factors as (x + m)(x + n) exactly when m × n = c and m + n = b. Put c on top of the diamond and b on the bottom; the sides are m and n. With −24 and 5, you get x² + 5x − 24 = (x + 8)(x − 3), which you can confirm with the FOIL calculator. When no integer pair works, the trinomial does not factor over the integers, and the quadratic formula calculator gives the exact roots — the same values this solver reports as decimals.
To list every factor pair of a number on its own, use the factors calculator.
Frequently asked questions
What is a diamond problem?
It is a diamond split into four parts. The top holds the product of two numbers, the bottom holds their sum, and the left and right hold the two numbers. Given any two parts, you find the other two.
How do you solve a diamond problem with a negative product?
A negative product means one number is positive and the other negative. List factor pairs with opposite signs and pick the pair whose sum matches the bottom. For a product of −24 and a sum of 5, the pair 8 and −3 works because 8 × (−3) = −24 and 8 + (−3) = 5.
How are diamond problems used in algebra?
They are a warm-up for factoring trinomials. To factor x² + 5x − 24, find two numbers that multiply to −24 and add to 5. The diamond gives 8 and −3, so x² + 5x − 24 = (x + 8)(x − 3).
What if no integers work?
The two numbers are the solutions of t² − St + P = 0, where S is the sum and P the product. The calculator uses the quadratic formula to give decimal answers, or tells you there is no real solution when S² − 4P is negative.