# Using Midpoint and Distance Formulas

### {{ 'ml-heading-theory' | message }}

*midpoint formula*and the distance between the points can be calculated using the

*distance formula*.

## Midpoint

The midpoint of a line segment is the point that divides the segment into two segments of equal length.

The point $M$ is the midpoint on the segment $\overline{AB}$ since the distance from $A$ to $M$ is the same as the distance from $M$ to $B.$## Segment Bisector

A segment bisector is an object that passes through the midpoint of a segment, *bisecting* it or dividing it into two segments of equal length. The object can be a line segment, line, ray, or a plane that passes though the midpoint.

## Midpoint Formula

The midpoint, $M,$ between two points, $(x_1, y_1)$ and $(x_2, y_2),$ can be determined using the midpoint formula. The coordinates for the midpoint can be seen as half of the horizontal and vertical distance.

## Dividing a Segment into a Given Ratio

Sometimes, it is necessary to divide a segment into two pieces that are not of equal length. This can be done when the endpoints of the segment and the desired ratio of the lengths are known. For example, find the point $P$ that divides $\overline{AB}$ so that the ratio of $AP$ to $PB$ is $3:2.$

## Distance Formula

Given two points in a coordinate plane, $A(x_1, y_1)$ and $B(x_2, y_2),$ the distance between them can be calculated using the distance formula.

$AB=\sqrt{\left(x_2-x_1 \right)^2+\left(y_2-y_1 \right)^2}$

## Finding Perimeter and Area using Distance Formula

### Perimeter

To find the perimeter of a shape in the coordinate plane, it is necessary to see each side of the shape as a line segment. When the coordinates of the vertices are known, the length of each side can be calculated separately using the distance formula.

The length of the perimeter is then found by adding the lengths of the sides.

### Area

Area is usually calculated using different formulas. However, for some shapes, one formula is not enough. Consider the example shown below.

The shape can be divided into pieces so that the area of each piece can be calculated. Here, that means dividing the shape into a rectangle and a triangle.

Once the vertices are marked, the needed lengths can be found using the distance formula. Then, the area of each shape can be found using the corresponding formula. The total area is the sum of the individual areas.## Exercises

*settings_overscan*

## {{ 'ml-heading-exercise' | message }} {{ focusmode.exercise.exerciseName }}

*keyboard_backspace*

{{ 'ml-tooltip-premium-exercise' | message }}

{{ 'ml-tooltip-recommended-exercise' | message }}

Programmeringsuppgift | {{ 'course' | message }} {{ exercise.course }}

*keyboard_backspace*{{ 'ml-btn-previous' | message }}

*keyboard_backspace*