直线方程,也称为“线性”方程,具有简单的变量表达式,没有指数,并且图形为直线。直线方程式只有两个变量:x和y,而不是像y 2或√x这样的变量。因为它包含有关这两个属性的信息,所以一种直线方程称为斜率截距形式。
The equation of a straight line is given as:
y = mx + c
where m and c are constants, has a graph that is a straight line.
e.g.:
y = 3x / 2 + 5, y = 2 x + 7 etc.
直线的截距形式
直线的斜率截距形式可能是表达直线方程的最常用方法。斜率截距形式,即y = mx + c是直线的方程,斜率是m,在y轴上成为截距c。在这里,m和c可以是任何两个实数。
The slope (or gradient) of the line is defined by the value of m in the equation. It may be either a positive, negative, or zero value.
- Positive gradient lines slope upwards from left to right.
- Negative gradient lines slant backward from left to right.
- Horizontal lines have a zero gradient.
c的值称为行的垂直截距。 x = 0时,它是y的值。绘制线时,c给出了线切割垂直轴的位置。
例如: y = 3x + 2,此处直线的斜率为3(即m = 3),并且在y轴上截距为2(即c = 2)。
为了使用斜率截距方程,所有要做的就是首先找到直线的斜率,然后确定直线的y截距。
现在,让我们学习如何编写直线的斜率截距方程,它有三个不同之处:
1.图表的截距方程
斜率截距形式的方程是通过组合直线的斜率和y截距而形成的,从而形成以下方程:y = mx + c。
为了建立斜率截距方程,将需要使用图形来定位斜率(m)和y截距(b)。让我们在示例的帮助下看一下该过程:
示例1:从下图显示3x – y + 2 = 0线的斜率截距形式:
![](https://mangdo-1254073825.cos.ap-chengdu.myqcloud.com//front_eng_imgs/geeksforgeeks2021/Writing%20Slope-Intercept%20Equations_0.jpg)
等式的图形表示:3x-y + 2 = 0
解决方案:
In the above figure, the slope of the line is 3 which makes an intercept of 2 on y-axis.
Now, if the equation of a line isn’t given, but the graph is given, then mark the x and y intercepts on the graph. Therefore, in the above graph
x-intercept is -2/3 and y-intercept is 2.
x | y |
-2/3 | 0 |
0 | 2 |
The slope of the line defined as the ratio of the change in y to the change in x between any two points on the line i.e.,
Slope = Change in y / Change in x
= (0 – 2) / (-2/3 – 0)
= 3
Therefore, the slope of the line is 3 which is making an intercept of 2 on y-axis. So, m is 3 and c is 2 and the equation of line from the graph is:
y = 3x + 2.
示例2:找到斜率等于2的直线的方程,其图形如下所示:
解决方案:
From the given graph,
The slope(m) of the line is 2, and it is having y-intercept at (0,3).
So, the value of c = 3.
Putting the values of m and c, in the equation of line as:
y = mx +c
= (2)x + (3)
= 2x + 3
Hence, the equation of the line is: y = 2x + 3.
2.斜率和点的截距方程
如果给出了通过点(x 1 ,y 1 )的直线斜率,则直线方程可以表示为:
y – y 1 = m(x – x 1 )
直线方程的这种形式也称为“点斜率”形式。
示例1:找到通过点(3,2)的直线的方程,该点的斜率等于3。
解决方案:
The graph for the straight line passing through the point (3,2) having slope equal to 3 is:
Given that,
Slope (m) = 3, and (x1, y1) = (3, 2)
The point-slope form is:
y – y1 = m(x – x1)
Now putting the values in the equation:
y – 2 = 3(x – 3)
= 3x – 9
y = 3x – 9 + 2
= 3x – 7
Hence, the equation of the line is: y = 3x – 7.
点斜率形式如何写成斜率截距形式?
由于斜率截距形式(即y = mx + c)和点斜率形式都是相同的方程式,但形式不同。
c的值(称为y截距)是直线与y轴交叉的位置。
因此,点(x 1 ,y 1 )实际上在(0,c)处,等式变为:
y-y 1 = m(x-x 1 )
(x 1 ,y 1 )实际上是(0,c):y − c = m(x − 0)
y − c = mx
y = mx + c
因此,如果已知直线上的一个点和直线的斜率,则也可以写成斜率截距形式(即点斜率形式)。
示例2:一条线的斜率为4,且其x轴截距为(5,0)。找到它的方程式。
解决方案:
Given that,
The slope (m) = 4, and (x1, y1) = (5, 0)
The point-slope form is:
y – y1 = m(x – x1)
Now putting the values in the equation:
y – 0 = 4(x – 5)
= 4x – 5
y = 4x – 5
Hence, the equation of the line is: y = 4x – 5.
3.两点的截距方程
示例1:让我们考虑一条穿过点(1,3)和(3,7)的线,如图所示。
确定直线的斜率截距形式。
解决方案:
According to two-point form of a straight line, slope of the line can be given as:
m = (y2 – y1) / (x2 – x1)
Substitute the given values in the above expression:
m = (7 – 3) / (3 – 1)
= 4/2
= 2
Now, substitute the value of m in slope-intercept form:
y = 2x + c
Now, y = 2x + c line passes through the points (1,3) and (3,7).
Substitute one of the coordinates in the equation:
y = 2x + c
3 = 2(1) + c
3 – 2 = c
c = 1
Thus, the equation of line is y = 2x + 1.
示例2:编写通过(4,7)和(6,13)的直线的方程式。
解决方案:
Use the formula to find the slope between the two points.
Slope, (m) = (13 – 7) / (6 – 4)
= 6/2
= 3
Substitute 3 for m in the equation y = mx + c.
⇒ y = 3x + c
Substitute one of the coordinates in the above equation:
7 = 3(4) + c
c = -12 + 7
= -5
Therefore, the slope-intercept form is given as: y = 3x – 5
4.从上下文构造线性方程
现在让我们学习如何从单词问题中构造线性方程。
示例1:本地供水有泄漏,每秒损失4加仑水。 15秒后,水位为1024加仑。编写一个表示这种情况的方程式。
解决方案:
The above problem can be represented in slope-intercept form i.e. y = mx + c, where the y-axis denotes the level of water and x-axis denotes the time in seconds.
Now, the water level is changing at 4 gallons per sec.
And since,
Slope = Change in y / Change in x
Therefore,
Slope = 4 gallons / 1 sec
= 4
But here water supply has a leak, and it is loosing 4 gallons per second, which means slope is decreasing, therefore slope of the line will be ‘-4’
Now, After 15 seconds, the water level was found to be at 1024 gallons.
So, by putting these values in y = mx + c, we get:
1024 gallons = (-4 gallons/ secs) × (15 secs) + c
1024 = -60 + c
c = 1084 gallons.
Now, putting the values of m and c to get the generalized equation of the line:
y = (-4) x + 1084
y = -4x + 1084
Hence, the above problem can be represented in a linear equation as: y = -4x + 1084
示例2:Ram正在爬山。她以800米的海拔高度开始远足,并以恒定的速度上升。 5小时后,她到达了1300米的高度。
解决方案:
Let y represent Ram’s elevation (in m) after x hours. Construct a linear equation for the relationship between elevation and number of hours.
Ram started her hike at 800 m, that means (0, 800) was her starting point. Looking closely at this point, the y-intercept of the graph between elevation (y-axis) and a number of hours (x-axis).
So, the value of c will be 800. Now, he is ascending at a constant rate and reaches 1300 m after 5 hours, i.e. he is at (1200, 5).
Now, using the two-point formula to find the slope of the line:
m = y2 – y1 / x2 – x1
= (1300 – 800) / (5 – 0)
= 500 / 5
= 100
Substitute 100 for m and 800 for c in the equation of slope-intercept form:
y = 100x + 800.
结论
要找到直线的斜率截距形式,需要找到以下内容:
- 线的斜率和
- 线的y截距
- 现在,如果给出了斜率为“ 1”且在(0,5)处的y截距的直线的图形,只需将m = 1和c = 5替换为斜率截距形式。
⇒y = x + 5
- 假设需要找到通过(3,2)且斜率= 3的直线的方程,使用点-斜率形式[即y – y 1 = m(x – x 1 )]来找到线。替换给定值:y – 2 = 3(x – 3)
⇒y = 3x – 7
- 如果一条线穿过两点,请使用两点形式查找该线的方程。
例如:如果一条线穿过点(1,3)和(2,5),则线的斜率可以通过以下公式得出:
⇒m =(5-3)/(2-1)
= 2
将m的值和坐标之一放在y = mx + c中,我们得到:
y = mx + c
3 =(2)1 + c
c = 1
因此,直线的方程式为y = 2x + 1。