Lesson: two routes to the same area
The SAS formula comes from the usual (1/2) × base × height. If two sides enclose angle C, the height to one of those sides is the other side times sin(C). Multiplying gives (1/2)ab sin(C). When C is 90°, sin(C) is 1 and the formula collapses to the right-triangle version (1/2)ab.
Heron’s formula is the SSS route. You do not need an angle. The semi-perimeter s is half the perimeter. The product s(s − a)(s − b)(s − c) is positive only when the three lengths satisfy the triangle inequality. A side of 0, a negative length, or three lengths that cannot close produces an error instead of an area.
The two formulas agree on a legal triangle. If you already solved for the sides on another page of this site, Heron’s formula is the fastest check. If you have SAS data and have not found the third side yet, the sine formula is enough.