Skip to content
Math

Diamond Problem Calculator

A diamond problem shows four numbers arranged in a diamond: the top holds the product of the two side numbers, and the bottom holds their sum. Enter any two known values and this calculator fills in the other two, showing every step of the working. It handles positive numbers, negatives, decimals, and cases where no real solution exists.

Your details

Choose which two values you already know. The calculator solves for the other two.
The value at the top of the diamond, which equals left x right.
The value at the bottom of the diamond, which equals left + right.
Product (top)Two distinct solutions
12

Left x right: the value at the top of the diamond

Left number4
Right number3
Sum (bottom)7
Solution A (left = this)4
Solution B (left = this)3
Status-
Left4
Right3
Product12
Sum7

Diamond solved: left = 4, right = 3.

  • The two side numbers are 4 and 3.
  • They multiply to 12 and add to 7, matching your inputs.
  • This is the same as factoring x² − (7)x + (12) = (x − 4)(x − 3).

Next stepUse these numbers to factor a quadratic: write x² − (sum)x + (product) = (x − left)(x − right).

Formula

x2(sum)x+product=0    x=sum±sum24×product2x^2 - (\text{sum})x + \text{product} = 0 \implies x = \dfrac{\text{sum} \pm \sqrt{\text{sum}^2 - 4 \times \text{product}}}{2}

Worked example

Given product = 12 and sum = 7: discriminant = 7^2 - 4*12 = 49 - 48 = 1. sqrt(1) = 1. Left = (7+1)/2 = 4, Right = (7-1)/2 = 3. Verify: 4 x 3 = 12 and 4 + 3 = 7.

What is a diamond problem?

A diamond problem (also called a diamond puzzle or X-puzzle) is a visual algebra exercise. The diagram is a diamond shape with four positions: two numbers on the left and right sides, the product of those numbers at the top, and the sum of those numbers at the bottom. Given any two of the four values, the goal is to find the other two. Teachers use diamond problems extensively to build intuition for factoring before students encounter the formal quadratic formula, because the left and right numbers are exactly the factors needed to rewrite x² + bx + c in factored form.

How to solve a diamond problem

The approach depends on which two values you already know. If you know both side numbers (left and right), simply multiply them for the product and add them for the sum. If you know the product and one side, divide: right = product / left. If you know the sum and one side, subtract: right = sum - left. The hardest case is when you know only the product and the sum, because you must find two unknown numbers. This is equivalent to solving x² - (sum)x + product = 0 with the quadratic formula: x = (sum +/- sqrt(sum^2 - 4 x product)) / 2. The two roots become the left and right numbers. If sum^2 - 4 x product is negative, no real number solution exists for that combination of product and sum.

Connection to factoring quadratics

The real power of diamond problems is how directly they connect to factoring. When you factor x² + bx + c, you are looking for two numbers that multiply to c (the product) and add to b (the sum). That is exactly the diamond problem with product = c and sum = b. For example, to factor x² + 7x + 12, you need two numbers with product 12 and sum 7: those are 4 and 3, so x² + 7x + 12 = (x + 4)(x + 3). Note that when the leading coefficient is 1 and the constant is positive with a positive sum, both factors are positive. When the constant is negative, the factors have opposite signs.

When does a diamond problem have no solution?

A product-and-sum diamond problem has no real solution when the discriminant sum² - 4 x product is negative. Geometrically, this means no pair of real numbers can simultaneously satisfy both constraints. For example, product = 10 and sum = 4 gives discriminant = 16 - 40 = -24, which is negative, so no real solution exists. This corresponds to the quadratic x² - 4x + 10 = 0 having only complex (imaginary) roots. You can always check in advance by computing sum² and comparing it with 4 x product: if the product is more than a quarter of sum², there is no real solution.

Diamond problem examples

Product (top)Sum (bottom)LeftRightQuadratic factored form
6532(x - 3)(x - 2)
12743(x - 4)(x - 3)
10752(x - 5)(x - 2)
-613-2(x - 3)(x + 2)
-824-2(x - 4)(x + 2)
0550(x - 5)(x - 0)
9633(x - 3)^2
-12-1-43(x + 4)(x - 3)

Common product/sum pairs used in classroom exercises, with their factor pairs and quadratic equivalents.

Frequently asked questions

What goes in each corner of a diamond problem?

The standard convention puts the product of the two side numbers at the top and their sum at the bottom. The two unknown side numbers go on the left and right. Some textbooks swap the top and bottom, so always confirm the convention your teacher uses before entering values.

How do I solve a diamond problem when the product and sum are given?

You need two numbers that multiply to the given product and add to the given sum. Set up the equation x² - (sum)x + product = 0 and use the quadratic formula: x = (sum +/- sqrt(sum^2 - 4 x product)) / 2. The two values of x are your left and right numbers. This calculator does all that working for you and shows every step.

Why are diamond problems useful?

Diamond problems build the number sense needed to factor quadratics. When you later factor x² + bx + c, you need exactly the numbers a diamond problem would give you for product = c and sum = b. Practicing many diamond problems makes that step feel automatic.

Can a diamond problem have two different answers?

Yes. In product-and-sum mode, the quadratic formula usually yields two distinct roots, giving one pair of side numbers (one larger, one smaller). When the discriminant is exactly zero, both roots are the same and the diamond has a single repeated number on both sides. When you already know one side number, there is always exactly one answer for the other side.

What does it mean when a diamond problem has no solution?

In product-and-sum mode, the discriminant sum² - 4 x product must be non-negative for real solutions to exist. If it is negative, no pair of real numbers can multiply to the given product and add to the given sum at the same time. The quadratic has only complex roots. Try decreasing the product or increasing the sum.

Do diamond problems work with negative numbers?

Yes. Negative products mean the two side numbers have opposite signs (one positive, one negative). Negative sums mean the side numbers are both negative or the larger magnitude is negative. This calculator handles negatives, decimals, and zero correctly in all six solving modes.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…