randFromArray(metricUnits.concat([genericUnit]))
randRange(2, 8) randRange(2, 8) randRange(1, 6) randRangeNonZero(-2, 2) 1/2 * (B1 + B2) * H
What is the area of this figure?
init({ range: [[-4, max(B1, B2) + 4], [-1, H + 1]], scale: [30, 30] }); style({ stroke: BLUE, fill: "#eee"}); path([[0, 0], [B1, 0], [B2 + SH, H], [SH, H], [0, 0]]); label([B1/2, 0], B1 + "\\text{ " + UNIT + "}", "below"); label([B2/2 + SH, H], B2 + "\\text{ " + UNIT + "}", "above"); var x = min(B1, B2 + SH); line([x, 0], [x, H], { strokeDasharray: "." }); label([x, H/2], H + "\\text{ " + UNIT + "}", "right"); rightAngleBox([[0, 0], [x, 0]], [[x, 0], [x, H]], { stroke: GRAY, opacity: 0.5 }); parallel([[0, 0], [B1, 0]], 1); parallel([[SH, H], [B2 + SH, H]], 1);
K square plural_form(UNIT_TEXT)

This figure is a quadrilateral with a pair of parallel sides (the top and bottom sides), so it's a trapezoid.

area of a trapezoid `= \dfrac12 \cdot (b_1 + b_2) \cdot h` [Show me why]

Let's draw a line between the opposite ends of the two bases.

var showSubHint = function() { graph.subhint.show(); $("a[data-subhint='area-trapezoid']") .unbind("click", showSubHint) .click(hideSubHint); }; var hideSubHint = function() { graph.subhint.hide(); $("a[data-subhint='area-trapezoid']") .unbind("click", hideSubHint) .click(showSubHint); }; graph.subhint = raphael.set().push( path([[0, 0], [B1, 0], [B2 + SH, H]], { stroke: BLUE, fill: ORANGE, opacity: 0.5 }), path([[SH, H], [B2 + SH, H], [0, 0]], { stroke: BLUE, fill: RED, opacity: 0.5 }) ); hideSubHint();

Notice that the line divides the trapezoid into two triangles: one triangle with base `b_1 = B1`, and another triangle with base `b_2 = B2`. Both triangles have height `h = H`.

The area of the trapezoid is equal to the sum of the areas of the two triangles.

`A = \dfrac12 \cdot b_1 \cdot h + \dfrac12 \cdot b_2 \cdot h`

Factor out `\dfrac12 \cdot h` to get the formula for the area of a trapezoid:

`A = \dfrac12 \cdot h \cdot (b_1 + b_2) = \dfrac12 \cdot (b_1 + b_2) \cdot h`

Now use this formula to calculate the trapezoid's area.

`b_1 = B1`

`b_2 = B2`

`h = H`

`A = \dfrac12 \cdot (B1 + B2) \cdot H = K`