DGS Studio

Distance Formula

Distance (1.5, 2.5) to (4.5, 6.5)

Distance between two points with decimal coordinates.

The points are (1.5, 2.5) and (4.5, 6.5). The distance is √[(4.5 − 1.5)² + (6.5 − 2.5)²] = √25, which is 5.

DGS marks the two points, draws the segment when the points are different, and labels the length. A zero length means the same point was entered twice, so there is no segment to draw.

Equation

distance((1.5,2.5),(4.5,6.5))

Lengths and tangents

Geometry examples state objects and a relationship, then DGS draws the figure and reports the measurement. A distance is the length of the segment between two points. A common tangent is a line that touches two circles, either externally or internally.

The drawing is there so the algebra has a picture. Lengths that come out as perfect squares stay exact. Other lengths keep a radical when the engine can simplify one, plus a decimal. Editing a coordinate or a radius is the fastest way to see which part of the formula changed.

Reading the input

Try a change

Generate Graph posts the expression to the studio graph engine and draws the result on the homepage. The editable field is the entire input, including every line.

Edit and generate

Generate Graph opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples