Call/WhatsApp/Text: 0716214439
Email Us: ordersclassytutors@gmail.com

Write a program that asks the user to enter two points on a 2D plane

May 05, 2022

1) Write a program that asks the user to enter two points on a 2D plane

2) Compute the distance between those points using a function

3) You can do the project within a group, in each group

4) Use pictures

5) Must use technology (Programming-Python) to represent the results. Materials (PROGRAMMING):

● Python

Replit.com

More details;

Two Point Form

Two point form can be used to express the equation of a line in coordinate plane. The equation of a line can be found through various methods depending on the available information. The two-point form is one of the methods. This is used to find the equation of a line when two points lying on the line are given. Some other important forms to represent the line equation are slope intercept form, intercept form, point slope form, etc. Let us understand the two point form using formula and examples in the following sections.

What is Two-Point Form?

Two point form is one of the important forms used to represent a straight line algebraically. The equation of a line represents each and every point on the line, i.e., it is satisfied by each point on the line. The two-point form of a line is used for finding the equation of a line given two points (x11, y11) and x22, y22) on it.

Equation of a Line in Two-Point Form

The two-point form of a line passing through these two points is:

y−y1=y2−y1x2−x1(x−x1)y−y1=y2−y1x2−x1(x−x1) OR y−y2=y2−y1x2−x1(x−x2)y−y2=y2−y1x2−x1(x−x2)

Here, (x, y) represents any random point on the line and we keep 'x' and 'y' as variables.

equation of line in two-point form

Formula For Two Point Form

The two point formula is used to represent a line algebraically using the coordinates of two points that lie on that line. The formula for two point form can be given as,

Two Point Form: Formula

y−y1=y2−y1x2−x1(x−x1)y−y1=y2−y1x2−x1(x−x1)

OR

y−y2=y2−y1x2−x1(x−x2)y−y2=y2−y1x2−x1(x−x2)

where,

  • (x, y) is an arbitrary point on the line.

  • (x11, y11) and (x22, y22) are coordinates of points lying on the line.

Derivation of Two Point Form Formula

We can derive the two point form equation for any line given the two points lying on that line. Let us consider two fixed points A(x11, y11) and B(x22, y22) on the line in a coordinate plane. Let us assume that C(x, y) is any random point on the line.

How Do You Find the Equation of a Line That Passes Through Two Points?

Since A, B, and C lie on the same line:

Slope of ←→ACAC↔ = Slope of ←→ABAB↔

Using the slope formula,

y−y1x−x1=y2−y1x2−x1y−y1x−x1=y2−y1x2−x1

Multiplying both sides by (x - x11),

y−y1y−y1 = y2−y1x2−x1(x−x1)y2−y1x2−x1(x−x1)

We derived the two-point form. It is used to find the equation of a line that passes through two points.

We can derive the another formula of two-point form, which is, y−y2=y2−y1x2−x1(x−x2)y−y2=y2−y1x2−x1(x−x2) in a similar manner.

Finding Equation of Line Using Two Point Form

As we discussed above, the equation of a line can be found using two points that lie on that line. We can follow the below-given steps while applying the two point form to find the straight-line equation.

Step 1: Note down the coordinates of the two points lying on the line as (x11, y11) and (x22, y22).

Step 2: Apply the two point formula given as, y−y1y−y1 = y2−y1x2−x1(x−x1)y2−y1x2−x1(x−x1).

Step 3: Simplify the obtained equation to the form, y = mx + b to represent the line.

Important Notes on Two Point Form:

  • The two-point form of a line can also be written as:
    y−y1x−x1=y2−y1x2−x1y−y1x−x1=y2−y1x2−x1 OR y−y2x−x2=y2−y1x2−x1y−y2x−x2=y2−y1x2−x1

  • The equation of a vertical line passing through (a, b) is of the form (x = a).
    This is an exceptional case where the two-point form cannot be used.

Thinking out of the box:

Which of the following graphs represents the equation y - 2 = [(1 - 2)/(-2 - 1)](x - 1)?


Challenging question on two point formChallenging question on two point form

Topics Related to Two Point Form:

Boost your grades with our academic help