Generic Rectangle Calculator
Multiply two polynomials step by step using the visual box method. See every partial product in a grid.
📐 What is the Generic Rectangle Method?
The generic rectangle method, also called the box method, is a visual technique for multiplying polynomials. Instead of applying the distributive property term by term in a single line, you draw a grid where one polynomial labels the rows and the other labels the columns. Every cell is then filled with the product of its row header and column header. The final expanded polynomial is found by collecting all cells that share the same power of x.
The method has direct classroom use. Middle school and high school students use it when multiplying two binomials, such as (2x + 3)(x - 4), and when multiplying a trinomial like (x² + 3x + 2) by a binomial like (2x - 1). College algebra courses use it to factor quadratics by reversing the process. The generic rectangle is also used in lattice multiplication for integers and in partial-fraction decomposition in calculus, where understanding how polynomials combine helps students reverse-engineer complex rational expressions.
A common point of confusion is the difference between the generic rectangle and FOIL. FOIL is a memory device for multiplying exactly two binomials: First, Outer, Inner, Last. It lists four products and works only for that one case. The generic rectangle generalises the same idea to any polynomial sizes. When both expressions are binomials, the four cells of a 2x2 grid correspond exactly to the four FOIL terms. When one expression is a trinomial, the grid becomes 3x2 with six cells, which FOIL cannot handle. Using the generic rectangle makes the distributive property visible and eliminates the risk of missing a partial product.
This calculator builds the rectangle grid instantly from the coefficients you enter. It supports two modes: Binomial times Binomial for quadratic results, and Trinomial times Binomial for cubic results. In each mode the table shows every partial product explicitly, the expanded polynomial appears below the grid, and the individual term coefficients are listed in separate result boxes so you can check each one against your own working.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1: (2x + 3)(x − 4)
Standard binomial multiplication with one negative constant
Example 2: (x + 5)(x + 5) — perfect square
Squaring a binomial: both off-diagonal cells are equal
Example 3: (3x − 2)(2x + 1)
Both leading coefficients non-one, one negative constant
Example 4: (x² + 3x + 2)(2x − 1) — trinomial mode
3×2 grid producing a cubic polynomial
❓ Frequently Asked Questions
🔗 Related Calculators
What is the generic rectangle method for multiplying polynomials?
The generic rectangle (or box method) is a visual algorithm for polynomial multiplication. You draw a grid where the terms of one polynomial label the rows and the terms of the other label the columns. Each cell is filled with the product of its row and column labels. Finally, you collect like terms from all cells to produce the expanded polynomial. It organises the distributive property so no partial product is missed.
How does the generic rectangle differ from FOIL?
FOIL stands for First, Outer, Inner, Last and works only for two binomials. The generic rectangle works for any polynomial sizes: binomial times binomial, trinomial times binomial, or even larger expressions. FOIL is a memory shortcut for a single special case; the box method is the general version that scales to any degree.
What are partial products in the generic rectangle?
Each cell in the grid is one partial product: the monomial from the row header multiplied by the monomial from the column header. For (2x + 3)(x - 4), the four partial products are 2x times x equals 2x2, 2x times -4 equals -8x, 3 times x equals 3x, and 3 times -4 equals -12. Adding all four gives 2x2 - 5x - 12.
How do I handle negative coefficients in the box method?
Negative coefficients flow through naturally. Enter the negative value directly. For example, if the second binomial is (x - 4), enter d = -4. Every cell product involving -4 will be negative automatically. The final polynomial will have the correct signs after you sum each power's cells.
What does the x coefficient equal in a binomial times binomial product?
For (ax + b)(cx + d), the x coefficient equals ad + bc. This is the sum of the two middle partial products: the top-right cell (a times d) and the bottom-left cell (b times c). The x2 coefficient is ac and the constant is bd. These three formulas come directly from the generic rectangle grid.
Can the generic rectangle handle trinomials?
Yes. For (ax2 + bx + c)(dx + e), draw a 3-row by 2-column grid. The rows are labeled ax2, bx, and c; the columns are dx and e. Fill each of the six cells, then collect terms of the same power. The result is a cubic polynomial adx3 + (ae + bd)x2 + (be + cd)x + ce.
Why does the box method help students avoid errors?
The box method forces every term in the first polynomial to be multiplied by every term in the second. With FOIL or informal distribution, it is easy to miss the inner or outer products when one expression has three or more terms. The visual grid acts as a checklist: if a cell is filled, the product was computed.
How do I expand (x + 2)(x + 3) using the generic rectangle?
Draw a 2x2 grid. Label the rows x and 2, the columns x and 3. Top-left: x times x equals x2. Top-right: x times 3 equals 3x. Bottom-left: 2 times x equals 2x. Bottom-right: 2 times 3 equals 6. Collect like terms: x2 + 3x + 2x + 6 equals x2 + 5x + 6.
What is the difference between a perfect square trinomial and a general trinomial in box method?
A perfect square trinomial (ax + b)2 expands so the two off-diagonal cells are equal (both equal ab times x). The expanded form is a2x2 + 2abx + b2. A general (ax + b)(cx + d) has two different middle terms ad times x and bc times x that may or may not be equal. The box method works the same way for both.
Can the generic rectangle method be used in reverse for factoring?
Yes, factoring by the box method is the reverse process. You fill the corner cells (x2 term and constant), find two middle-row values whose product equals the corner product and whose sum equals the middle coefficient, then read off the row and column labels as the factor pair. This is the same as factoring by grouping but laid out visually.
What is the FOIL method and when should I use it instead?
FOIL (First, Outer, Inner, Last) multiplies two binomials: the first terms, the outer terms, the inner terms, and the last terms, then sums all four. Use FOIL when both expressions are single binomials and you want a quick mental calculation. Use the generic rectangle when either expression has three or more terms, when you need a visual record of each partial product, or when teaching the concept to students.