Write the general equation of the straight line passing through the point. General equation of a straight line on a plane

Let the line pass through the points M 1 (x 1; y 1) and M 2 (x 2; y 2). The equation of the straight line passing through the point M 1 has the form y-y 1 \u003d k (x - x 1), (10.6)

where k - still unknown coefficient.

Since the straight line passes through the point M 2 (x 2 y 2), the coordinates of this point must satisfy the equation (10.6): y 2 -y 1 \u003d k (x 2 -x 1).

From here we find Substituting the found value k into equation (10.6), we obtain the equation of a straight line passing through points M 1 and M 2:

It is assumed that in this equation x 1 ≠ x 2, y 1 ≠ y 2

If x 1 \u003d x 2, then the straight line passing through the points M 1 (x 1, y I) and M 2 (x 2, y 2) is parallel to the ordinate axis. Its equation has the form x \u003d x 1 .

If y 2 \u003d y I, then the equation of the straight line can be written in the form y \u003d y 1, the straight line M 1 M 2 is parallel to the abscissa axis.

Equation of a straight line in segments

Let the straight line intersect the Ox axis at the point M 1 (a; 0), and the Oy axis - at the point M 2 (0; b). The equation will take the form:
those.
... This equation is called the equation of a straight line in segments, since the numbers a and b indicate which segments are cut off by a straight line on the coordinate axes.

Equation of a straight line passing through a given point perpendicular to a given vector

Let us find the equation of a straight line passing through a given point Mo (x O; y o) perpendicular to a given nonzero vector n \u003d (A; B).

Take an arbitrary point M (x; y) on a straight line and consider the vector M 0 M (x - x 0; y - y o) (see Fig. 1). Since the vectors n and M o M are perpendicular, their scalar product is zero: that is

A (x - xo) + B (y - yo) \u003d 0. (10.8)

Equation (10.8) is called the equation of a straight line passing through a given point perpendicular to a given vector .

The vector n \u003d (A; B), perpendicular to the straight line, is called normal the normal vector of this line .

Equation (10.8) can be rewritten as Ax + Wu + C \u003d 0 , (10.9)

where A and B are the coordinates of the normal vector, C \u003d -Aх о - Ву о - free term. Equation (10.9) is the general equation of the straight line (see fig. 2).

Fig. 1 Fig. 2

Canonical equations of the line

,

Where
- coordinates of the point through which the straight line passes, and
- direction vector.

Second-order Curves Circle

A circle is the set of all points of the plane, equidistant from a given point, which is called the center.

The canonical equation of a circle of radius R centered at point
:

In particular, if the center of the stake coincides with the origin, then the equation will look like:

Ellipse

An ellipse is a set of points on a plane, the sum of the distances from each of which to two given points and , which are called foci, are constant
greater than the distance between the foci
.

The canonical equation of an ellipse, the foci of which lie on the Ox axis, and the origin of coordinates midway between the foci has the form
r de
a the length of the semi-major axis;b - the length of the semi-minor axis (Fig. 2).

Canonical equations of a straight line in space are the equations that define a straight line passing through a given point collinear to the direction vector.

Let a point and a direction vector be given. An arbitrary point lies on a straight line l only if the vectors and are collinear, i.e., they satisfy the condition:

.

The above equations are the canonical equations of the straight line.

Numbers m , n and p are the projections of the direction vector onto the coordinate axes. Since the vector is nonzero, then all numbers m , n and p cannot simultaneously equal zero. But one or two of them may turn out to be zero. In analytical geometry, for example, the following notation is allowed:

,

which means that the projection of the vector on the axis Oy and Oz are equal to zero. Therefore, both the vector and the straight line given by the canonical equations are perpendicular to the axes Oy and Oz , i.e., the plane yOz .

Example 1. Write the equations of a straight line in space perpendicular to the plane and passing through the point of intersection of this plane with the axis Oz .

Decision. Find the point of intersection of this plane with the axis Oz ... Since any point lying on the axis Oz , has coordinates, then, setting in the given equation the plane x \u003d y \u003d0, we get 4 z - 8 \u003d 0 or z \u003d 2. Therefore, the point of intersection of this plane with the axis Oz has coordinates (0; 0; 2). Since the desired straight line is perpendicular to the plane, it is parallel to its normal vector. Therefore, the directing vector of the straight line can be the normal vector a given plane.

Now we write down the sought equations of the straight line passing through the point A \u003d (0; 0; 2) in the direction of the vector:

Equations of a straight line passing through two given points

A straight line can be specified by two points lying on it and In this case, the direction vector of the straight line can be a vector. Then the canonical equations of the straight line take the form

.

The above equations determine the straight line passing through two given points.

Example 2. Make the equation of a straight line in space passing through the points and.

Decision. Let us write the sought equations of the straight line in the form given above in the theoretical reference:

.

Since, then the sought line is perpendicular to the axis Oy .

Straight as a line of intersection of planes

A straight line in space can be defined as the line of intersection of two non-parallel planes and, i.e., as a set of points that satisfy the system of two linear equations

The equations of the system are also called general equations of a straight line in space.

Example 3. Write the canonical equations of a straight line in space given by general equations

Decision. To write the canonical equations of a straight line or, which is the same, the equations of a straight line passing through two given points, you need to find the coordinates of any two points of the straight line. They can be the points of intersection of a straight line with any two coordinate planes, for example yOz and xOz .

Point of intersection of a straight line with a plane yOz has an abscissa x \u003d 0. Therefore, setting in this system of equations x \u003d 0, we get a system with two variables:

Her decision y = 2 , z \u003d 6 together with x \u003d 0 defines a point A (0; 2; 6) the desired line. Then, setting in the given system of equations y \u003d 0, we get the system

Her decision x = -2 , z \u003d 0 together with y \u003d 0 defines a point B (-2; 0; 0) intersections of a straight line with a plane xOz .

Now we write down the equations of the straight line passing through the points A (0; 2; 6) and B (-2; 0; 0) :

,

or after dividing the denominators by -2:

,

Equation of a straight line passing through a given point in a given direction. Equation of a straight line passing through two given points. The angle between two straight lines. The condition of parallelism and perpendicularity of two lines. Determination of the intersection point of two lines

1. Equation of a straight line passing through a given point A(x 1 , y 1) in this direction, determined by the slope k,

y - y 1 = k(x - x 1). (1)

This equation defines a pencil of lines passing through the point A(x 1 , y 1), which is called the center of the beam.

2. Equation of a straight line passing through two points: A(x 1 , y 1) and B(x 2 , y 2) is written as follows:

The slope of a straight line passing through two given points is determined by the formula

3. Angle between straight lines A and B called the angle by which you need to turn the first straight A around the point of intersection of these lines counterclockwise until it coincides with the second line B... If two straight lines are given by equations with a slope

y = k 1 x + B 1 ,

In this article, we will consider the general equation of a straight line on a plane. Let us give examples of constructing a general equation of a straight line if two points of this straight line are known or if one point and the normal vector of this straight line are known. Let us present the methods for transforming the equation in general form into canonical and parametric forms.

Let an arbitrary Cartesian rectangular coordinate system be given Oxy... Consider an equation of the first degree or a linear equation:

Ax + By + C=0, (1)

where A, B, C - some constants, and at least one of the elements A and B nonzero.

We will show that a linear equation in a plane defines a line. Let us prove the following theorem.

Theorem 1. In an arbitrary Cartesian rectangular coordinate system on a plane, each straight line can be specified by a linear equation. Conversely, each linear equation (1) in an arbitrary Cartesian rectangular coordinate system on a plane defines a straight line.

Evidence. It is enough to prove that the line L is determined by a linear equation for any one Cartesian rectangular coordinate system, since then it will be determined by a linear equation and for any choice of a Cartesian rectangular coordinate system.

Let a straight line be given on the plane L... Let us choose a coordinate system so that the axis Ox coincided with a straight line Land the axis Oy was perpendicular to it. Then the equation of the line L will take the following form:

y \u003d 0. (2)

All points on a straight line L will satisfy linear equation (2), and all points outside this straight line will not satisfy equation (2). The first part of the theorem is proved.

Let a Cartesian rectangular coordinate system be given and let a linear equation (1) be given, where at least one of the elements A and B nonzero. Let us find the locus of points whose coordinates satisfy equation (1). Since at least one of the coefficients A and B is nonzero, then equation (1) has at least one solution M(x 0 ,y 0). (For example, for A≠ 0, point M 0 (−C / A, 0) belongs to the given locus of points). Substituting these coordinates in (1), we obtain the identity

Ax 0 +By 0 +C=0. (3)

Let us subtract identity (3) from (1):

A(xx 0)+B(yy 0)=0. (4)

It is obvious that equation (4) is equivalent to equation (1). Therefore, it suffices to prove that (4) defines some line.

Since we are considering a Cartesian rectangular coordinate system, it follows from equality (4) that a vector with components ( x − x 0 , y − y 0) is orthogonal to the vector n with coordinates ( A, B}.

Consider some straight line Lpassing through the point M 0 (x 0 , y 0) and perpendicular to the vector n (Fig. 1). Let the point M(x, y) belongs to the straight line L... Then the vector with coordinates x − x 0 , y − y 0 perpendicular n and equation (4) is satisfied (scalar product of vectors n and is equal to zero). Back if point M(x, y) does not lie on the straight line L, then the vector with coordinates x − x 0 , y − y 0 is not orthogonal to vector n and equation (4) is not satisfied. The theorem is proved.

Evidence. Since lines (5) and (6) define the same line, the normal vectors n 1 ={A 1 ,B 1) and n 2 ={A 2 ,B 2) are collinear. Since vectors n 1 ≠0, n 2 ≠ 0, then there exists a number λ , what n 2 =n 1 λ ... Hence we have: A 2 =A 1 λ , B 2 =B 1 λ ... Let us prove that C 2 =C 1 λ ... Obviously, the coinciding lines have a common point M 0 (x 0 , y 0). Multiplying equation (5) by λ and subtracting from it equation (6) we get:

Since the first two equalities from expressions (7) hold, then C 1 λ C 2 \u003d 0. Those. C 2 =C 1 λ ... The remark is proven.

Note that equation (4) defines the equation of the straight line passing through the point M 0 (x 0 , y 0) and having a normal vector n={A, B). Therefore, if the normal vector of a straight line and a point belonging to this straight line are known, then it is possible to construct a general equation of the straight line using equation (4).

Example 1. A straight line passes through a point M\u003d (4, −1) and has a normal vector n\u003d (3, 5). Construct the general equation of the line.

Decision. We have: x 0 =4, y 0 =−1, A=3, B\u003d 5. To construct the general equation of a straight line, we substitute these values \u200b\u200binto equation (4):

Answer:

Vector parallel to the straight line L and, therefore, perdicular to the normal vector of the straight line L... We construct a normal vector of a straight line L, taking into account that the scalar product of vectors n and is equal to zero. We can write down, for example, n={1,−3}.

To construct the general equation of a straight line, we will use formula (4). Substitute in (4) the coordinates of the point M 1 (we can also take the coordinates of the point M 2) and normal vector n:

Substituting the coordinates of the points M 1 and M 2 in (9), we can make sure that the straight line given by equation (9) passes through these points.

Answer:

Subtract (10) from (1):

We got the canonical equation of the line. Vector q={−B, A) is the directing vector of the straight line (12).

See reverse transformation.

Example 3. A straight line on a plane is represented by the following general equation:

Move the second term to the right and divide both sides of the equation by 2 · 5.

Lesson from the series "Geometric Algorithms"

Hello dear reader!

Today we will start exploring algorithms related to geometry. The fact is that there are a lot of Olympiad problems in computer science related to computational geometry, and the solution of such problems often causes difficulties.

In a few lessons, we will look at a number of elementary subproblems, which are the basis for solving most problems in computational geometry.

In this lesson, we will create a program for finding the equation of the straight linepassing through given two points... To solve geometric problems, we will need some knowledge of computational geometry. We will devote part of the lesson to getting to know them.

Computational Geometry Information

Computational geometry is a branch of computer science that studies algorithms for solving geometric problems.

The initial data for such problems can be a set of points on a plane, a set of segments, a polygon (specified, for example, by a list of its vertices in clockwise order), etc.

The result can be either an answer to some question (such as whether a point belongs to a segment, whether two segments intersect, ...), or some geometric object (for example, the smallest convex polygon connecting specified points, the area of \u200b\u200ba polygon, etc.) ...

We will consider computational geometry problems only on a plane and only in a Cartesian coordinate system.

Vectors and coordinates

To apply computational geometry methods, geometric images must be translated into the language of numbers. We will assume that a Cartesian coordinate system is specified on the plane, in which the direction of rotation counterclockwise is called positive.

Geometric objects are now analytically expressed. So, to set a point, it is enough to indicate its coordinates: a pair of numbers (x; y). A segment can be specified by specifying the coordinates of its ends, a straight line can be specified by specifying the coordinates of a pair of its points.

But the main tool for solving problems will be vectors. Therefore, I will remind you of some information about them.

Section AB, at which point AND considered the beginning (point of application), and the point IN - end, called a vector AB and denotes either or a bold lowercase letter, for example and .

To denote the length of a vector (that is, the length of the corresponding segment), we will use the modulus symbol (for example,).

An arbitrary vector will have coordinates equal to the difference between the corresponding coordinates of its end and beginning:

,

here points A and B have coordinates respectively.

For calculations, we will use the concept oriented angle, that is, the angle that takes into account the relative position of the vectors.

Oriented angle between vectors a and b positive if rotation away from vector a to vector b is done in the positive direction (counterclockwise) and negative otherwise. See fig.1a, fig.1b. They also say that a pair of vectors a and b positively (negatively) oriented.

Thus, the value of the oriented angle depends on the order in which the vectors are listed and can take values \u200b\u200bin the range.

Many computational geometry problems use the concept of vector (skew or pseudoscalar) products of vectors.

The vector product of vectors a and b is the product of the lengths of these vectors by the sine of the angle between them:

.

Vector product of vectors in coordinates:

The expression on the right is a second-order determinant:

Unlike the definition given in analytic geometry, it is a scalar.

The cross product sign determines the position of the vectors relative to each other:

a and b positively oriented.

If a value, then a pair of vectors a and b negatively oriented.

The vector product of nonzero vectors is zero if and only if they are collinear ( ). This means that they lie on one straight line or on parallel lines.

Let's consider a few of the simplest tasks needed to solve more complex ones.

Let us define the equation of a straight line by the coordinates of two points.

Equation of a straight line passing through two different points given by their coordinates.

Let two non-coinciding points be given on a straight line: with coordinates (x1; y1) and with coordinates (x2; y2). Accordingly, a vector with a beginning at a point and an end at a point has coordinates (x2-x1, y2-y1). If P (x, y) is an arbitrary point on our line, then the vector coordinates are (x-x1, y - y1).

Using the vector product, the collinearity condition for vectors and can be written as follows:

Those. (x-x1) (y2-y1) - (y-y1) (x2-x1) \u003d 0

(y2-y1) x + (x1-x2) y + x1 (y1-y2) + y1 (x2-x1) \u003d 0

We rewrite the last equation as follows:

ax + by + c \u003d 0, (1)

c \u003d x1 (y1-y2) + y1 (x2-x1)

So, a straight line can be set by an equation of the form (1).

Task 1. The coordinates of two points are given. Find its representation as ax + by + c \u003d 0.

In this lesson, we learned about some computational geometry information. We solved the problem of finding the equation of the line by the coordinates of two points.

In the next lesson, we will compose a program to find the intersection point of two lines given by our equations.