You can use the absolute value method to find the distance between two points that are on the same horizontal line or vertical line.
For example
The distance between
(2,-7) and (2,9).
![d= |9 - - 7| = |16| = 16](https://img.qammunity.org/2019/formulas/mathematics/middle-school/hgtuxu4gln5j8dfc9c0a84vptodbmhnapv.png)
Or
![d = | - 7 - 9| = | - 16| = 16](https://img.qammunity.org/2019/formulas/mathematics/middle-school/ovzilgl5xsy7v87y27ydj4782dxa6cjkmi.png)
Note that this does not apply to points that are not parallel to the axes.