Calculate whether two Lines are Parallel using the Determinant

Date: 2014-10-08 |

DISCLOSURE: If you buy through affiliate links, I may earn a small commission. (disclosures)

**Problem: **Figure out whether two lines are parallel using the determinant

**Solution: **If we have line AB and line CD (technically edges as lines continue on into infinity), then we can determine whether these two lines are parallel by taking the determinant of the two.

Computing P = AB | CD will give us the point at which the two lines intersect.  If the lines don’t intersect i.e. are parallel, then the result will be 0.

Want more like this?

The best way to support my work is to like / comment / share for the algorithm and subscribe for future updates.