Quadrilateral area and perimeter
Quadrilateral area and perimeter
Quadrilateral area and perimeter · S,P
- 123 bytes
- CMPLX mode
Worked examples
Example 1
The ordered corners of a rectangular garden are A(−2,−1), B(6,−1), C(6,4) and D(−2,4), with coordinates in metres. Which option gives its exact area? Also find its perimeter.
Answer
Standard solution (without a calculator)
- Find the width: AB=6−(−2)=8 m because A and B have equal y-coordinates.
- Find the height: BC=4−(−1)=5 m because B and C have equal x-coordinates.
- Find the area: S=8×5=40 m².
- Find the perimeter: P=2(8+5)=26 m.
- Conclude: both results are exact; the area corresponds to option B.
Example 2
A parallelogram flag is drawn with ordered vertices A(1,1), B(5,2), C(7,5) and D(3,4), with coordinates in centimetres. Find its exact area and perimeter in surd form; also give the perimeter to 3 decimal places.
Answer
Standard solution (without a calculator)
- Identify the sides: AB=(4,1) and AD=(2,3); BC=AD and DC=AB, as required for a parallelogram.
- Find the area: the side determinant gives S=|4×3−1×2|=10 cm².
- Find side lengths: AB=√(4²+1²)=√17 cm and AD=√(2²+3²)=√13 cm.
- Add the sides: P=2(√17+√13) cm=15.457313802… cm.
- Round only at the end: P=15.457 cm to 3 decimal places; the exact area is 10 cm².
Example 3
A concave courtyard has ordered vertices A(0,0), B(5,0), C(2,1) and D(0,4), with coordinates in metres. Find its exact area and perimeter, and give the perimeter to 3 decimal places.
Answer
Standard solution (without a calculator)
- Preserve the boundary order: use A→B→C→D→A. C is the inward corner, so a rectangle or trapezium formula is inappropriate.
- Apply shoelace: the forward sum is 0×0+5×1+2×4+0×0=13; the reverse sum is 0×5+0×2+1×0+4×0=0. Thus S=|13−0|/2=6.5 m².
- Find the sides: AB=5 m, BC=√((2−5)²+(1−0)²)=√10 m, CD=√((0−2)²+(4−1)²)=√13 m and DA=4 m.
- Add: P=5+√10+√13+4=9+√10+√13 m=15.767828935… m.
- State the results: the exact area is 6.5 m² and the perimeter is 15.768 m to 3 decimal places.
When to use it
Represent a point (x,y) by x+yi and follow the actual perimeter A→B→C→D→A. Area comes from the diagonal cross product; perimeter is the sum of the four side lengths. Sorting points by x-coordinate is not a substitute for boundary order.
Enter the vertices
- At A?, B?, C? and D?, enter the complete coordinates of the first, second, third and fourth vertices as x+yi. Use ENG for i.
- A point on the x-axis may be a real number; the origin is 0 and (0,y) is yi. Enter all four values explicitly in the same length unit.
Read both results
- The first screen shows area S in square units and pauses at Disp. Press EXE once to read final perimeter P in length units.
- Math ERROR can indicate a detected crossing or an invalid or degenerate input. Unlike the four-line program, this program does not use −1 as a crossing marker.
Question types
- Original practice at HKDSE Mathematics Compulsory Part level: coordinate areas, perimeter by the distance formula, exact surd answers and concave figures.
Before you start
- Use CMPLX / Deg / Norm 1 and P1 with 123 bytes free; P1–P4 share 680 bytes. The program overwrites A,B,C,D,M and Ans.
- Enter four complete complex coordinates in clockwise or anticlockwise perimeter order, not sorted by either coordinate. Use ENG for i and (−) for negative coordinates.
- Use four distinct vertices and a simple nonzero-area boundary, convex or concave. No three vertices should be collinear.
- The crossing test rejects ordinary nondegenerate bow-tie boundaries with Math ERROR. Repeated vertices may also raise Math ERROR, but some degenerate cases, overlapping sides or endpoint contacts may not be detected; inspect the geometry yourself.
- Use the same length unit on both axes. S uses square units and P uses length units; retain exact surds in a written answer when required.
- Nearly collinear points, very large coordinates or extreme scale differences can cause cancellation and rounding error. The LCD’s finite precision is not an exact surd result.
- Blank EXE reuses stored coordinates, not zero. Area pauses at Disp; EXE continues to perimeter and AC exits the final screen.
Checking access…