The area of a paralellogram is one of the most elementary formulars in computational geometry.
Here are some examples of its application:
Calculating the area of a triangle or an arbitrary (convex and concave) polygon
Test if a point lies left, right or on a line (test if three points are ordered clockwise (CW) or counter clockwise (CCW))
Test if a polygon is convex or concave
Test if a point lies inside a cone given by three points
Test if two lines intersect without calculating the intersection point
Sorting points by "leftness" as a preparing step for Graham's convex hull algorithm
The area of a paralellogram spanned by two vectors a and b can be expressed in R^{2} by the 2 x 2 determinant:
A(P) =
a_{x} a_{y}
b_{x} b_{y}
= a_{x} * b_{y} - a_{y} * b_{x}
It turns out that this can easily be shown geometrically:
(For simplicity we will assume that all coordinates are positive. I leave it as an exercise for the reader to show that the equation holds for arbitrary cooridnates.)
We will prove the area calculation by a disjoint decomposition of the bounding box around a paralellogram:
As it can be easily seen the area of the parallelogram is what remains if we substract from the red bouding-box the four triangles (yellow, green, orange, light turquoise) and the two rectangles in the upper-left and lower-right corner.
Viewed mathematically we have got:
area of red bouding box = (a_{x} + b_{x}) * (a_{y} + b_{y})
green and light tourquise triangle added together form the rectangle: a_{x} * a_{y}
yellow and orange triangle added together form the rectangle: b_{x} * b_{y}
upper-left and lower rigth rectangle are each a rectangle of b_{x} * a_{y}, thus togher: 2 * a_{y} * b_{x}