Dice:

- a dot **P**(x_{1}, y_{1})

- a straight line **r**: ax + by + c = 0

The distance between them (d_{pr}) is given by:

Let's calculate the distance, for example, from the point **P**(-1.2) straight **r**: x - 2y + 1 = 0.

We have **P**(-1, 2) = **P**(x1, y1), a = 1, b = - 2 and c = 1. Like this: