Graphical display of a point on a complex drawing.

Consider the following figure.

It shows the graph of the function y = x^3 - 3*x^2. Consider some interval containing the point x = 0, for example from -1 to 1. Such an interval is also called the neighborhood of the point x = 0. As you can see on the graph, in this neighborhood the function y = x^3 - 3*x^2 takes highest value exactly at the point x = 0.

Maximum and minimum of a function

In this case, the point x = 0 is called the maximum point of the function. By analogy with this, the point x = 2 is called the minimum point of the function y = x^3 - 3*x^2. Because there is such a neighborhood of this point in which the value at this point will be minimal among all other values ​​from this neighborhood.

dot maximum function f(x) is called a point x0, provided that there is a neighborhood of the point x0 such that for all x not equal to x0 from this neighborhood, the inequality f(x)< f(x0).

dot minimum function f(x) is called a point x0, provided that there is a neighborhood of the point x0 such that for all x not equal to x0 from this neighborhood, the inequality f(x) > f(x0) is satisfied.

At the maximum and minimum points of the functions, the value of the derivative of the function is equal to zero. But this is not a sufficient condition for the existence of a function at a maximum or minimum point.

For example, the function y = x^3 at the point x = 0 has a derivative equal to zero. But the point x = 0 is not the minimum or maximum point of the function. As you know, the function y = x^3 increases on the entire real axis.

Thus, the minimum and maximum points will always be among the root of the equation f’(x) = 0. But not all roots of this equation will be maximum or minimum points.

Stationary and critical points

The points at which the value of the derivative of a function is equal to zero are called stationary points. There can also be points of maximum or minimum at points where the derivative of the function does not exist at all. For example, y = |x| at the point x = 0 has a minimum, but the derivative does not exist at this point. This point will be the critical point of the function.

The critical points of a function are the points at which the derivative is equal to zero, or the derivative does not exist at this point, that is, the function at this point is non-differentiable. In order to find the maximum or minimum of a function, a sufficient condition must be satisfied.

Let f(x) be some function differentiable on the interval (a;b). The point x0 belongs to this interval and f'(x0) = 0. Then:

1. if, when passing through the stationary point x0, the function f (x) and its derivative changes sign, from “plus” to “minus”, then the point x0 is the maximum point of the function.

2. if, when passing through the stationary point x0, the function f (x) and its derivative changes sign, from “minus” to “plus”, then the point x0 is the minimum point of the function.

Hello to all Habr people. I want to present to dear readers an example when dry and far from life in our understanding higher mathematics gave a good practical result.

First some memories
It was when I was a student at one of the technical universities in the 90s, probably the second year. I somehow got to the Olympiad in programming. And at this very Olympiad there was a task: to set the coordinates of a triangle, a test point on the plane, and to determine whether this point belongs to the area of ​​the triangle. In general, a trifling problem, but then I did not solve it. But then I thought about a more general task - belonging to a landfill. I repeat - it was the mid-90s, there was no Internet, there were no books on computer geometry, but there were lectures on the tower and a laboratory 286 with turbo pascal. And so the stars coincided, that just at the time when I was thinking about the problem, they were reading the theory of a complex variable to us on the tower. And one formula (about it below) fell on fertile ground. The algorithm was invented and implemented in Pascal (unfortunately, my one and a half gigabyte screw died and carried away this code and a bunch of my other youthful developments into oblivion). After the institute, I got to work in one research institute. There I had to deal with the development of GIS for the needs of the institute's employees, and one of my own tasks was to determine if objects fell into the contour. The algorithm was rewritten in C++ and proved to be excellent in work.

Task for the algorithm

Given:
Г - a closed polyline (hereinafter referred to as a polygon) on the plane, given by the coordinates of its vertices (xi, yi), and the coordinate of the test point (x0, y0)
Define:
whether the point belongs to the area D bounded by the polygon.

The derivation of formulas for the subsequent writing of the algorithm in no way claims to be mathematically complete and accurate, but only demonstrates an engineering (consumer approach) to the Queen of the fields of sciences.

Explanation from a worker-peasant engineering point of view:
- the boundary G is our given contour,
- z0 - tested point
- f(z) - complex function does not go to infinity anywhere in the contour from the complex argument.

That is, in order to establish whether a point belongs to a contour, we need to calculate the integral and compare it with the value of the function at a given point. If they match, then the point lies in the contour. Note: Cauchy's integral theorem says that if the point does not lie in the contour, then the integrand never goes to infinity, then the integral zero. This simplifies the matter - you just need to calculate the integral and check it for equality to zero: the point is not the contour equal to zero, it is different - it lies in the contour.
Let's do the calculation of the integral. For f(z) we take a simple function 1. Without loss of generality, we can take the point 0 as z0 (you can always shift the coordinates).

We get rid of the imaginary unit in the denominator of the integrand and split the integral into real and imaginary parts:

We have obtained two curvilinear integrals of the second kind.
Compute the first

The condition that the integral does not depend on the path is fulfilled, therefore, the first integral is equal to zero and it is not necessary to calculate it.

With the imaginary part, this trick does not work. Recall that our border consists of line segments, we get:

Where Гi is the segment (xi,yi)- (xi+1,y i+1)
Let's calculate the i-th integral. To do this, we write the equation of the i-th segment in the parametric form

Substitute in the integral

And after cumbersome and tedious transformations, we get the following charming formula:

Finally we get

Algorithm in C++:

template <class T>
bool pt_in_polygon( const T &test,const std::vector &polygon)
{
if (polygon.size()<3) return false;

Std::vector::const_iterator end=polygon.end();

T last_pt=polygon.back();

Last_pt.x-=test.x;
last_pt.y-=test.y;

double sum=0.0;

for(
std::vector::const_iterator iter=polygon.begin();
iter!=end;
++iter
{
T cur_pt=*iter;
cur_pt.x-=test.x;
cur_pt.y-=test.y;

double del= last_pt.x*cur_pt.y-cur_pt.x*last_pt.y;
double xy= cur_pt.x*last_pt.x+cur_pt.y*last_pt.y;

Sum+=
atan((last_pt.x*last_pt.x+last_pt.y*last_pt.y - xy)/del)+
atan((cur_pt.x*cur_pt.x+cur_pt.y*cur_pt.y-xy)/del)
);

last_pt=cur_pt;

return fabs(sum)>eps;

T - point type, for example:
struct PointD
{
double x,y;
};

Control:
left click - add a new contour point
right button - close the contour
left with Shift held - move the test point

Gentlemen, who are interested, I give a faster algorithm. Not mine anymore.
Special thanks for the article.
template bool pt_in_polygon2(const T &test,const std::vector &polygon)
{

Static const int q_patt= ( (0,1), (3,2) );

If(polygon.size()<3) return false;

Std::vector::const_iterator end=polygon.end();
T pred_pt=polygon.back();
predict_pt.x-=test.x;
pred_pt.y-=test.y;

int pred_q=q_patt;

For(std::vector::const_iterator iter=polygon.begin();iter!=end;++iter)
{
T cur_pt = *iter;

Cur_pt.x-=test.x;
cur_pt.y-=test.y;

int q=q_patt;

Switch (q-pred_q)
{
case -3:++w;break;
case 3:--w;break;
case -2:if(pred_pt.x*cur_pt.y>=pred_pt.y*cur_pt.x) ++w;break;
case 2:if(!(pred_pt.x*cur_pt.y>=pred_pt.y*cur_pt.x)) --w;break;
}

Pred_pt = cur_pt;
predict_q = q;

In two-dimensional space, two lines intersect only at one point, given by the coordinates (x, y). Since both lines pass through their point of intersection, the coordinates (x, y) must satisfy both equations that describe these lines. With some advanced skills, you can find the intersection points of parabolas and other quadratic curves.

Steps

Point of intersection of two lines

    Write down the equation of each line, isolating the variable "y" on the left side of the equation. Other terms of the equation should be placed on right side equations. Perhaps the equation given to you instead of "y" will contain the variable f (x) or g (x); in this case isolate such a variable. To isolate a variable, do the appropriate mathematical operations on both sides of the equation.

    • If the equations of the lines are not given to you, on the basis of information known to you.
    • Example. Given straight lines described by the equations and y − 12 = − 2 x (\displaystyle y-12=-2x). To isolate the "y" in the second equation, add the number 12 to both sides of the equation:
  1. You are looking for the intersection point of both lines, that is, the point whose (x, y) coordinates satisfy both equations. Since the variable "y" is on the left side of each equation, the expressions on the right side of each equation can be equated. Write down a new equation.

    • Example. As y = x + 3 (\displaystyle y=x+3) and y = 12 − 2x (\displaystyle y=12-2x), then we can write the following equality: .
  2. Find the value of the variable "x". The new equation contains only one variable "x". To find "x", isolate this variable on the left side of the equation by doing the appropriate math on both sides of the equation. You should end up with an equation like x = __ (if you can't do that, see this section).

    • Example. x + 3 = 12 − 2 x (\displaystyle x+3=12-2x)
    • Add 2x (\displaystyle 2x) to each side of the equation:
    • 3x + 3 = 12 (\displaystyle 3x+3=12)
    • Subtract 3 from each side of the equation:
    • 3x=9 (\displaystyle 3x=9)
    • Divide each side of the equation by 3:
    • x = 3 (\displaystyle x=3).
  3. Use the found value of the variable "x" to calculate the value of the variable "y". To do this, substitute the found value "x" in the equation (any) straight line.

    • Example. x = 3 (\displaystyle x=3) and y = x + 3 (\displaystyle y=x+3)
    • y = 3 + 3 (\displaystyle y=3+3)
    • y=6 (\displaystyle y=6)
  4. Check the answer. To do this, substitute the value of "x" in another equation of a straight line and find the value of "y". If you receive different meaning"y", check the correctness of your calculations.

    • Example: x = 3 (\displaystyle x=3) and y = 12 − 2x (\displaystyle y=12-2x)
    • y = 12 − 2 (3) (\displaystyle y=12-2(3))
    • y = 12 − 6 (\displaystyle y=12-6)
    • y=6 (\displaystyle y=6)
    • You got the same "y" value, so there are no errors in your calculations.
  5. Write down the coordinates (x, y). By calculating the values ​​\u200b\u200bof "x" and "y", you have found the coordinates of the point of intersection of two lines. Write down the coordinates of the intersection point in the form (x, y).

    • Example. x = 3 (\displaystyle x=3) and y=6 (\displaystyle y=6)
    • Thus, two lines intersect at a point with coordinates (3,6).
  6. Computations in special cases. In some cases, the value of the variable "x" cannot be found. But that doesn't mean you made a mistake. A special case occurs when one of the following conditions is met:

    • If two lines are parallel, they do not intersect. In this case, the variable "x" will simply be reduced, and your equation will turn into a meaningless equality (for example, 0 = 1 (\displaystyle 0=1)). In this case, write down in your answer that the lines do not intersect or there is no solution.
    • If both equations describe one straight line, then there will be an infinite number of intersection points. In this case, the variable "x" will simply be reduced, and your equation will turn into a strict equality (for example, 3 = 3 (\displaystyle 3=3)). In this case, write down in your answer that the two lines coincide.

    Problems with quadratic functions

    1. Definition of a quadratic function. In a quadratic function, one or more variables have a second degree (but not higher), for example, x 2 (\displaystyle x^(2)) or y 2 (\displaystyle y^(2)). Graphs of quadratic functions are curves that may not intersect or intersect at one or two points. In this section, we will tell you how to find the point or points of intersection of quadratic curves.

    2. Rewrite each equation by isolating the variable "y" on the left side of the equation. Other terms of the equation should be placed on the right side of the equation.

      • Example. Find the point(s) of intersection of the graphs x 2 + 2 x − y = − 1 (\displaystyle x^(2)+2x-y=-1) and
      • Isolate the variable "y" on the left side of the equation:
      • and y = x + 7 (\displaystyle y=x+7) .
      • In this example, you are given one quadratic function and one linear function. Remember that if you are given two quadratic functions, the calculations are similar to the steps below.
    3. Equate the expressions on the right side of each equation. Since the variable "y" is on the left side of each equation, the expressions on the right side of each equation can be equated.

      • Example. y = x 2 + 2 x + 1 (\displaystyle y=x^(2)+2x+1) and y = x + 7 (\displaystyle y=x+7)
    4. Transfer all the terms of the resulting equation to its left side, and write 0 on the right side. To do this, perform basic mathematical operations. This will allow you to solve the resulting equation.

      • Example. x 2 + 2 x + 1 = x + 7 (\displaystyle x^(2)+2x+1=x+7)
      • Subtract "x" from both sides of the equation:
      • x 2 + x + 1 = 7 (\displaystyle x^(2)+x+1=7)
      • Subtract 7 from both sides of the equation:
    5. Decide quadratic equation. By transferring all the terms of the equation to its left side, you get a quadratic equation. It can be solved in three ways: using a special formula, and.

      • Example. x 2 + x − 6 = 0 (\displaystyle x^(2)+x-6=0)
      • When factoring the equation, you get two binomials, which, when multiplied, give the original equation. In our example, the first member x 2 (\displaystyle x^(2)) can be decomposed into x*x. Make the following entry: (x)(x) = 0
      • In our example, the intercept -6 can be factored as follows: − 6 ∗ 1 (\displaystyle -6*1), − 3 ∗ 2 (\displaystyle -3*2), − 2 ∗ 3 (\displaystyle -2*3), − 1 ∗ 6 (\displaystyle -1*6).
      • In our example, the second term is x (or 1x). Add each pair of intercept factors (-6 in our example) until you get 1. In our example, the correct pair of intercept factors are -2 and 3 ( − 2 ∗ 3 = − 6 (\displaystyle -2*3=-6)), as − 2 + 3 = 1 (\displaystyle -2+3=1).
      • Fill in the gaps with the found pair of numbers: .
    6. Don't forget about the second point of intersection of the two graphs. If you solve the problem quickly and not very carefully, you can forget about the second intersection point. Here's how to find the "x" coordinates of two intersection points:

      • Example (factoring). If in the equation (x − 2) (x + 3) = 0 (\displaystyle (x-2)(x+3)=0) one of the expressions in brackets will be equal to 0, then the whole equation will be equal to 0. Therefore, we can write it like this: x − 2 = 0 (\displaystyle x-2=0)x = 2 (\displaystyle x=2) and x + 3 = 0 (\displaystyle x+3=0)x = − 3 (\displaystyle x=-3) (that is, you found two roots of the equation).
      • Example (use formula or complete square). If you use one of these methods, the solution will show Square root. For example, the equation from our example will take the form x = (− 1 + 25) / 2 (\displaystyle x=(-1+(\sqrt (25)))/2). Remember that when taking the square root, you will get two solutions. In our case: 25 = 5 ∗ 5 (\displaystyle (\sqrt(25))=5*5), and 25 = (− 5) ∗ (− 5) (\displaystyle (\sqrt (25))=(-5)*(-5)). So write down two equations and find two x values.
    7. Graphs intersect at one point or do not intersect at all. Such situations occur when the following conditions are met:

      • If the graphs intersect at one point, then the quadratic equation is decomposed into equal factors, for example, (x-1) (x-1) = 0, and the square root of 0 appears in the formula ( 0 (\displaystyle (\sqrt(0)))). In this case, the equation has only one solution.
      • If the graphs do not intersect at all, then the equation does not factorize, and the square root of a negative number appears in the formula (for example, − 2 (\displaystyle (\sqrt(-2)))). In this case, write in the answer that there is no solution.
This is the second part of my article devoted to computational geometry. I think this article will be more interesting than the previous one, since the puzzles will be a little more difficult.

Let's start with relative position points relative to a line, a ray and a segment.

Task #1
Determine the relative position of the point and the line: lies above the line, on the line, under the line.

Decision
It is clear that if the straight line is given by its equation ax + by + c = 0, then there is nothing to solve here. It is enough to substitute the coordinates of the point into the equation of a straight line and check what it is equal to. If it is greater than zero, then the point is in the upper half-plane, if equal to zero, then the point is on the line, and if it is less than zero, then the point is in the lower half-plane. More interesting is the case when the line is given, given by the coordinates of two points, let's call them P 1 (x 1, y 1), P 2 (x 2, y 2). In this case, one can safely find the coefficients a, b, and c and apply the previous reasoning. But we must first think, do we need it? Of course not! As I said, the skew product is just a gem of computational geometry. Let's apply it. It is known that the skew product of two vectors is positive if the rotation from the first vector to the second is counterclockwise, equal to zero if the vectors are collinear and negative if the rotation is clockwise. Therefore, it is enough for us to calculate the skew product of the vectors P 1 P 2 and P 1 M and draw a conclusion based on its sign.

Task #2
Determine if a point belongs to a ray.

Decision
Let's remember what a ray is: a ray is a straight line bounded by a point on one side and infinite on the other. That is, the ray is given by some starting point and any point lying on it. Let the point P 1 (x 1 , y 1) be the beginning of the ray, and P 2 (x 2 , y 2) be any point belonging to the ray. It is clear that if a point belongs to a ray, then it also belongs to the line passing through these points, but not vice versa. Therefore, belonging to a line is a necessary but not sufficient condition for belonging to a ray. Therefore, we cannot avoid checking the skew product. For a sufficient condition, it is also necessary to calculate the scalar product of the same vectors. If it is less than zero, then the point does not belong to the ray; if it is not negative, then the point lies on the ray. Why is that? Let's look at the drawing.

So, in order for the point M(x, y) to lie on the ray with the initial point P 1 (x 1 , y 1), where P 2 (x 2 , y 2) lies on the ray, it is necessary and sufficient to fulfill two conditions:

2. (P 1 P 2 , P 1 M) ≥ 0 is the scalar product (the point lies on the ray)

Task #3
Determine if a point belongs to a segment.

Decision
Let the points P 1 (x 1, y 1), P 2 (x 2, y 2) be the ends of the given segment. Again necessary condition belonging of a point to a segment is its belonging to a straight line passing through P 1 , P 2 . Next, we need to determine whether the point lies between the points P 1 and P 2, for this we are helped by the scalar product of vectors only this time others: (MP 1 , MP 2). If it is less than or equal to zero, then the point lies on the segment, otherwise it is outside the segment. Why is that? Let's look at the picture.

So, in order for the point M(x, y) to lie on a segment with ends P 1 (x 1 , y 1), P 2 (x 2 , y 2) it is necessary and sufficient to fulfill the conditions:
1. \u003d 0 - skew product (the point lies on the line)
2. (MP 1 ,MP 2) ≤ 0 – dot product (point lies between P 1 and P 2)

Task #4
The relative position of two points relative to a straight line.

Decision
In this problem, it is necessary to determine two points on one or on opposite sides of a straight line.

If the points are on opposite sides of a straight line, then the skew products have different signs, so their product is negative. If the points lie on the same side with respect to the straight line, then the signs of the skew products coincide, which means that their product is positive.
So:
1. * < 0 – точки лежат по разные стороны.
2. * > 0 – the points lie on the same side.
3. * = 0 - one (or two) of the points lies on a straight line.

By the way, the problem of determining the presence of an intersection point of a line and a segment is solved in exactly the same way. More precisely, this is the same problem: a segment and a straight line intersect when the ends of the segment are on different sides relative to the straight line or when the ends of the segment lie on the straight line, that is, it is necessary to require * ≤ 0.

Task #5
Determine if two lines intersect.

Decision
We will assume that the lines do not coincide. It is clear that lines do not intersect only if they are parallel. Therefore, having found the condition of parallelism, we can determine whether the lines intersect.
Suppose the lines are given by their equations a 1 x + b 1 y + c 1 = 0 and a 2 x + b 2 y + c 2 = 0. Then the condition for parallel lines is that a 1 b 2 - a 2 b 1 = 0.
If the lines are given by points P 1 (x 1, y 1), P 2 (x 2, y 2), M 1 (x 3, y 3), M 2 (x 4, y 4), then the condition for their parallelism is in checking the skew product of the vectors P 1 P 2 and M 1 M 2: if it is equal to zero, then the lines are parallel.

In general, when the lines are given by their equations, we also check the skew product of the vectors (-b 1 , a 1), (-b 2 , a 2) which are called direction vectors.

Task #6
Determine if two line segments intersect.

Decision
This is the task I really like. Segments intersect when the ends of each segment lie on opposite sides of the other segment. Let's look at the picture:

So, we need to check that the ends of each of the segments lie on opposite sides of the relative ends of the other segment. We use the skew product of vectors. Look at the first picture: > 0,< 0 => * < 0. Аналогично
* < 0. Вы наверно думаете, почему не меньше либо равно. А потому, что возможен следующий случай, при котором векторное произведение как раз и равно нулю, но отрезки не пересекаются:

Therefore, we need to make one more check, namely: whether at least one end of each segment belongs to another (belonging to a point of a segment). We have already solved this problem.

So, in order for the segments to have common points, it is necessary and sufficient:
1. The ends of the segments lie on different sides relative to another segment.
2. At least one of the ends of one segment belongs to another segment.

Task #7
The distance from a point to a line.

Decision
Let the line be given by two points P 1 (x 1, y 1) and P 2 (x 2, y 2).

In the previous article, we talked about the fact that the geometrically skew product is the oriented area of ​​the parallelogram, so S P 1 P 2 M = 0.5*. On the other hand, every student knows the formula for finding the area of ​​a triangle: half the base times the height.
S P 1 P 2 M \u003d 0.5 * h * P 1 P 2.
Equating these areas, we find

Modulo was taken because the first area is oriented.

If the line is given by the equation ax + by + c = 0, then the equation of the line passing through the point M perpendicular to the given line is: a (y - y 0) - b (x - x 0) = 0. Now you can easily solve the system from the obtained equations, find their intersection point and calculate the distance from the starting point to the found one: it will be exactly ρ = (ax 0 + by 0 + c) / √ (a 2 + b 2).

Task #8
The distance from the point to the beam.

Decision
This problem differs from the previous one in that in this case it can happen, so that the perpendicular from the point does not fall on the ray, but falls on its continuation.

In the case when the perpendicular does not fall on the ray, it is necessary to find the distance from the point to the beginning of the ray - this will be the answer to the problem.

How to determine whether the perpendicular falls on the ray or not? If the perpendicular does not fall on the ray, then the angle MP 1 P 2 is obtuse, otherwise it is acute (straight). Therefore, by the sign of the scalar product of vectors, we can determine whether the perpendicular falls on the ray or not:
1. (P 1 M, P 1 P 2)< 0 перпендикуляр не попадает на луч
2. (P 1 M, P 1 P 2) ≥ 0 the perpendicular hits the ray

Task #9
The distance from a point to a line.

Decision
We argue similarly to the previous problem. If the perpendicular does not fall on the segment, then the answer is the minimum of the distances from the given point to the ends of the segment.

To determine whether the perpendicular falls on the segment, it is necessary, by analogy with the previous task, to use the scalar product of vectors. If the perpendicular does not fall on the segment, then either the angle MP 1 P 2 or the angle MP 2 P 1 will be obtuse. Therefore, according to the sign scalar products we can determine whether the perpendicular falls on the segment or not:
If (P 1 M, P 1 P 2)< 0 или (P 2 M, P 2 P 1) < 0 то перпендикуляр не падает на отрезок.

Task #10
Determine the number of points on a line and a circle.

Decision
A line and a circle can have zero, one or two points of intersection. Let's look at the pictures:

Here, from the drawings, everything is clear. We have two points of intersection if the distance from the center of the circle to the line is less than the radius of the circle. One point of contact if the distance from the center to the line is equal to the radius. And finally, no intersection point if the distance from the center of the circle to the straight line is greater than the radius of the circle. Since the problem of finding the distance from a point to a line has already been solved by us, this problem has also been solved.

Task #11
Mutual arrangement of two circles.

Decision
Possible cases of arrangement of circles: intersect, touch, do not intersect.

Consider the case when the circles intersect and find the area of ​​their intersection. I love this problem very much, because I spent a fair amount of time on solving it (it was a long time ago - in the first year).




Let us now recall what a sector and a segment are.

The intersection of circles consists of two segments O 1 AB and O 2 AB.

It would seem that it is necessary to add up the areas of these segments and that's it. However, everything is not so simple. It is also necessary to determine whether these formulas are always true. It turns out not!

Consider the case when the center of the second circle O 2 coincides with the point C. In this case, d 2 = 0, and we take α = π for the value of α. In this case, we have a semicircle with area 1/2 πR 2 2 .

Now consider the case when the center of the second circle O 2 is between the points O 1 and C. In this case, we obtain a negative value of d 2 . Using a negative value of d 2 results in negative value a. In this case, it is necessary to add 2π to α for the correct answer.

Conclusion
That's it. We have not considered all, but the most common problems of computational geometry concerning the relative position of objects.

I hope you liked it.

To solve the problem, we divide it into the following stages:

  1. Consideration of the problem from the side of multidimensional space.
  2. Consideration of the problem from the side of two-dimensional space.
  3. Calculation of the number of intersection points.

Consideration of the problem from the side of multidimensional space

Let's say the lines are in three-dimensional space, then they may not be parallel to each other in one of the planes and stand apart from each other in the other plane. This means that such lines will be pairwise non-parallel and will not have intersection points.

Consideration of the problem from the side of two-dimensional space

In a two-dimensional space (plane) two lines are not parallel, which means that they necessarily have one and only one point of intersection. By condition, the lines do not pass through one (common) intersection point, therefore, since the lines are not pairwise parallel, each of them necessarily intersects the remaining ones.

Calculation of the number of intersection points

When adding a new non-parallel line to the plane, points of intersection with those lines that have already been plotted on the plane will be added. Therefore, two lines give 1 point of intersection. By adding a third line, we get 2 more points of intersection with the two lines already drawn; adding the fourth straight line, we get 3 more points of intersection; fifth - 4 more points of intersection. Thus, in total we get:

1 + 2 + 3 + 4 = 10 intersection points

Answer: 1) multidimensional space - 0 intersection points; 2) two-dimensional space - 10 points of intersection.

Two lines have one point of intersection. By adding one more line to them, we get 2 more points of intersection with each of these two lines. By adding one more line, it will additionally give as many points of intersection as there were already lines, i.e. 3 more. And so on. Each nth line gives additional (n-1) points of intersection with (n-1) lines.

1 + 2 + 3 + 4 = 10

All of the above is true if none of any 3 lines has 1 common intersection point.

If, nevertheless, the lines can intersect at one point, but not all at once, then by placing 4 lines with a star we have 1 of their intersection points, and by adding the 5th line we get 4 more points. In this case, 5 lines will have 5 common points of intersection.

Answer: 10 points of intersection will be formed by 5 non-parallel lines when more than 2 lines do not intersect at one point. Or 5 points of intersection if more than two lines can intersect at one point.

Loading...Loading...