Refer to the attached image. Since one vertex is the origin and the other two lay on the coordinate axes, the triangle is a right triangle. This means that, if we consider AB to the be base, AC is his height, and vice versa.
Anyway, it means that the area is given by

Since AB is a horizontal segment and AC is a vertical segment, their length is given by the absolute difference of the non-constant coordinate: points A and B share the same x coordinate, so we subtract the y coordinates:

The opposite goes for AC: points A and C share the same y coordinate, so we subtract the x coordinates:

So, the area is
