The Wayback Machine - https://web.archive.org/web/20240930152913/https://www.geeksforgeeks.org/slope-of-line/
Open In App

Slope of a Line

Last Updated : 07 May, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Slope of a Line is the measure of the steepness of a line a surface or a curve whichever is the point of consideration. The slope of a Line is a fundamental concept in the stream of calculus or coordinate geometry or we can say the slope of a line is fundamental to the complete mathematics subject. The understanding of slope helps us solve many problems in mathematics, physics, or engineering.

In this article, we will learn about the slope of a line in detail, slope of a straight line with its various methods of calculations, and also the equation for the slope of a line.

What is a Slope?

In mathematics, the slope is the measure of the steepness of a line or a surface which means the slope of a line tells us how steep a line or surface is inclined with the positive x-axis. The higher the slope of a curve or a line, the greater the amount of steepness it will show in the graph. Generally, the slope is defined in two-dimensional coordinates as the ratio of the change in the y-coordinate with respect to the change in the x-coordinate.

What is the Slope of a Line?

Similar to the general slope, the slope of a line or the slope of a straight line is the measure of the steepness of a line and is mathematically given as the ratio of the change in the y-coordinate to the change in the x-coordinate of the line. Other than this mathematical interpretation, the slope has a physical interpretation that tells us about the line that is in which direction the line will tilt.

A higher positive slope shows less tilt in the positive x direction and a lower positive slope shows a higher tilt in the positive x direction. For the negative slope, the higher the absolute value of the negative slope higher the tilt towards the negative x direction.

Slope of a Line Formula

Formula of the slope is given by the ratio of change in the y coordinate to the change in the x coordinate, which can be written mathematically as

Slope = Change in y coordinate/Change in x coordinate = Δy/Δx

Slope-of-a-Line

Slope of a Line

If the inclination of the line with a positive x-axis is Îļ, then the slope is given as follows:

m = tan Îļ

Slope of a Line Equation

The slope of a line is given by the equation

y – y1 = m(x – x1)

⇒ y = mx + C where m is slope and C is intercept

How to Find Slope of a Line?

There are various methods to find the slope of any line, which can be used appropriately on the basis of the given conditions. These methods are:

  • Calculation of Slope between Two Points
  • Calculation of Slope from Graph
  • Calculation of Slope from Table

Calculation of Slope between Two Points

If the given points are (x1, y1) and (x2, y2) then the slope of a line passing through both points is given by:

[Tex]\bold{\text{Slope} = \frac{y_2 – y_1}{x_2 – x_1}} [/Tex]

 Slope between Two Points

Example: Find the point of the slope if points are (4, 2) and (8, 12).

Solution:

Given:

Point A (4,2) and point B (8,12)

Coordinate x1 and y1 is 4 and 2

Coordinate x2 and y2 is 8 and 12

Thus, [Tex]m=\frac{(y_2-y_1)}{(x_2-x_1 )} [/Tex]

⇒ m = (12 – 2)/(8 – 4)

⇒ m = 10/4 = 2.5

Calculation of Slopes from Graph

Calculation of the slope from a Graph can be achieved using the following steps:

Step 1: Mark two points on the line with their coordinates.

Step 2: Use the Formula for the Slope between two points to calculate the slope.

Slopes from Graph

Example: Find the slope of the following line in the graph.

 Find the slope of the following line in the graph.

Solution:

We have to find Δx and Δy (change in x and change in y)

So, change in Δx is 6 and change is Δy  -3

Now slope m is given as follows:

m = Δy/Δx

⇒  m = 6/-3 = -2

Calculation of Slope from Table

Calculation of the Slope from the Table can be done using the following steps:

Step 1: Choose two values of x and its corresponding values of y from the table.

Step 2: Calculate the change in x value and change in y value.

Step 3: Calculate the slope using the formula, Slope = change in y-values/change in x-values.

Example 1: Calculate the slope between x = 1 and x = 3 of the following table.

x-value

y-value

1

5

2

7

3

9

4

11

5

13

Solution:

Change in x-values = 3 – 1 = 2

Change in y-values = 9 – 5 = 4

As we know, Slope = change in y-values/change in x-values

⇒ Slope = 4/2 = 2

So, the slope between x=1 and x=3 in this table is 2.

Example 2: Calculate the slope of the following table.

xy
25
310
415
520

Solution:

Identify change in each consecutive pair of y so change in the y is 5, 5 and 5.

Identify change in each consecutive pair of x so change in the x is 1, 1 and 1.

Now writing the ratio using slope formula 5/1, 5/1 and 5/1.   

So, slope from table is 5.

Positive and Negative Slope

A line is said to have a positive slope if it is making less than the right angle with the positive x-axis and a line is said to have a negative slope if it makes more than the right angle with the positive x-axis.

In other words, a line with a positive slope looks tilted forward in the direction of the positive x-axis, and a line with a negative slope looks tilted backward in the direction of the negative y-axis.

Slopes of Different Lines

There can be various different lines that can be named such as:

  • Horizontal Line
  • Vertical Line
  • Perpendicular Lines
  • Parallel Lines

Let’s discuss the Slope of these various different lines as follows:

Slope of Horizontal Line

The line that is parallel to the x-axis is called a horizontal line and the slope of a Horizontal Line is 0 as there is no change in the y-coordinate throughout the line for any change in the x-coordinate. Since the slope of the Horizontal Line is Zero, it is also called a Zero Slope line. Thus mathematically we can represent this as:

Slope of Horizontal Line = 0/change in x-coordinate = 0

Slope of Vertical Line

The line parallel to the y-axis is called a vertical line and the slope of a Vertical Line is not defined as there is no change in the x-coordinate throughout the line for any change in the y-coordinate. The Vertical Line is also called Undefined Slope Line. Thus mathematically we can represent this as:

Slope of Vertical Line = Change in y-coordinate/0 = Not Defined

Horizontal and Vertical Lines

Slope of Perpendicular Lines

The slope of Perpendicular Lines are inversely proportional to each other and their product is -1. In other words, if we have two lines with slopes m1 and m2, then the condition for those two lines to be perpendicular is:

m1 = -1/m2  

OR

m1 × m2 = -1 

Perpendicular Lines

Slope of Parallel Lines

The slope of Parallel Lines is the same as both the lines are at the same inclined with the positive x-axis. In other words, if the slope of one line is m then the slope of a line parallel to that line is also m.

Parallel Lines

Equation of Line in Slope Intercept Form

The equation of a line in the slope-intercept form is given as follows:

y = mx + c

Where,

  • m is the slope of the line
  • c is the y-intercept cut by the line
Equation of Line in Slope Intercept Form

Equation of Line Using Slope

If a line is passing through a point (x1, y1) and its slope is m, then the equation of a line is given as follows:

y – y1 = m(x – x1)

Where x and y represent all the coordinates of the line.

We can also write the same equation using the two points from which the line is passing. If the line passes through (x1, y1) and (x2, y2) then its equation is given by:

[Tex]\bold{y – y_1 =  \frac{y_2 – y_1}{x_2 – x_1}\cdot \left(x – x_1\right)} [/Tex]

Example 1: Find the equation of a line given in the graph.

Find the equation of a line given in the graph.

Solution:

Slope of the graph is, m = 8/2 = 4

and we know the equation of line passing through (x1, y1) with slope m is given by

y – y1 = m (x – x1)

Thus, equation of line (4,2) with slope 4 is

y – 2 = 4 (x – 4)

⇒ y – 2 = 4x – 16

⇒ y = 4x – 16 +2

⇒ y = 4x – 14

Example 2: Find the equation of the line given in the graph.

Find the equation of the line given in the graph.

Solution:

Two given points (x1, y1) and (x2, y2) are A (2,3) and B (5,7)

[Tex]y-y_1=  \frac{(y_2-y_1)}{(x_2-x_1)}\times  (x-x_1 ) [/Tex]

⇒ y-3=  {(7 -3)/(5-2)} (x-2)

⇒ [Tex]y-3=  \frac{(7-3)}{(5-2)}\times  (x-2) [/Tex]

⇒ [Tex]y-3=  \frac{(4)}{(3)}\times  (x-2) [/Tex]

⇒ 3y-9 = 4x-8

⇒ 3y = 4x+1

Equation of Line in Normal Form

Equation of the line whose length of the perpendicular from the origin is p and the angle made by the perpendicular with the positive x-axis is given by Îą is given by:

x cos Îą + y sin Îą = p

This is known as the normal form of the line.

Equation of Line in Normal Form

In the case of the general form of the line Ax + By + C = 0 can be represented in normal form as:

[Tex]\bold{A cos α + B sin α = – p} [/Tex]

From this we can say that [Tex]\cos ι = \frac{-p}{A}     [/Tex] and [Tex]\sin ι = \frac{-p}{B} [/Tex]

Also, it can be inferred that,

[Tex]cos2Îą + sin2Îą = \frac{(p)}{(A)}^{2}+ \frac{(p)}{(B)}^{2} [/Tex]

⇒ [Tex]1 = p^{2} \frac{(A^2 + B^2)}{(A^2. B^2)}  [/Tex]

⇒ [Tex]p=\frac{A.B}{\sqrt{A^{2} + B^{2}}} [/Tex]

From the general equation of a straight-line Ax + By + C = 0, we can conclude the following:

  • Slope is given by -A/B, given that B ≠ 0.
  • x-intercept is given by -C/A and the y-intercept is given by -C/B.
  • It can be seen from the above discussion that:
    • [Tex]p=Âą\frac{A.B}{\sqrt{A^{2} + B^{2}}}[/Tex] 
    • [Tex]cosÎą=Âą\frac{B}{\sqrt{A^{2} + B^{2}}}[/Tex]
    • [Tex]sinÎą=Âą\frac{A}{\sqrt{A^{2} + B^{2}}}[/Tex]
  • If two points (x1, y1) and (x2, y2) are said to lie on the same side of the line Ax + By + C = 0, then the expressions Ax1+ By1 + C and Ax2 + By2 + C will have the same sign or else these points would lie on the opposite sides of the line.

Angle between Two Lines

When two lines with slopes m1 and m2 intersect they form angles. The relation between the slope of the intersecting lines and the angle so formed is given as follows:

tanÎļ = [Tex]|\frac{m_2-m_1}{1+m_2*m_1}| [/Tex]

if [Tex]|\frac{m_2-m_1}{1+m_2*m_1}|  [/Tex] > 0, acute angle is formed between the lines

if [Tex]|\frac{m_2-m_1}{1+m_2*m_1}|   [/Tex]< 0, obtuse angle is formed between the lines

Angle between Two Lines

Read More,

Sample Problems on Slope of a Line

Problem 1: Find the slope of points (1,2) and (2,3).

Solution:

As slope is given as m = (y2 – y1)/(x2 – x1)

⇒ m = (3 – 2)/(2 – 1)

⇒ m = 1

Problem 2: Find the value of x if the slope is 2 and points are (2,2) and (x,6).

Solution:

m = (y2 – y1)/(x2 – x1)

⇒ 2 = (6 – 2)/(x – 2)

⇒ 4 = 2(x-2)

⇒ x-2 = 2

⇒ x = 4

Problem 3: Find the value of y if slope is 3 and points are (2,13) and (4, y).

Solution:

m = (y2 – y1)/(x2 – x1)

⇒ 3 = (y – 13)/(4 – 2)

⇒ y – 13 = 3(2)

⇒ y – 13 = 6

⇒ y = 6 + 13 = 19

Problem 4: Find the line passing from coordinates (2,5) and the slope of a line is 5.

Solution:

Slope m = 4

y – y1= m (x – x1)

We know slope m = 5 and point (x1, y1) = (2,5)

Now putting these value in equation

⇒ y – 5 = 5 x (x – 2)

⇒ y – 5 = 5x – 10

⇒ y = 5x – 10 + 5

⇒ y = 5x -5

FAQs on Slope of a Line

What is the Slope of a Line?

Slope is the measure of the steepness of a line which tells us how much a line is inclined with the positive x-axis.

What is the slope of a straight line?

Slope of a straight line is same as slope of a line. As a line is always a straight line.

How is the Slope of a Line calculated?

To calculate the slope of a line, we just need to take two point on the line and calculate the ratio of change in y-coordinate to change in x-coordinate.

What does a Positive and Negative Slope represent?

Positive Slope represents that graph is increasing in nature while Negative Slope represents that in graph line is going down from left to right.

Can the Slope of a Line be greater than 1?

Yes slope of a line can be greater than 1, as one of the formula for is slope m = tan Îļ, and range of tan Îļ is the complete set of real numbers.

What is the Slope-Intercept form of a Line?

Slope-intercept form of a line is given as follows:

y = mx + c

What is the Point-Slope form of a Line?

Point slope form is called point slope form, as it is defined as a line is passing through a point (x1, y1) and its slope is m, and is given by:

y – y1 = m(x – x1)



Previous Article
Next Article

Similar Reads

How does a positive slope differ from a negative slope?
Slope defines the steepness of a line and the way in which it tilts. The positive slope differs from the negative slope by the inclination of the line. In this article, we will explore how the positive slope differs from the negative slope. Table of Content What is Slope?What is a Positive Slope?What is a Negative Slope?How does a Positive Slope Di
5 min read
Point Slope Form Formula of a Line
In geometry, there are several forms to represent the equation of a straight line on the two-dimensional coordinate plane. There can be infinite lines with a given slope, but when we specify that the line passes through a given point then we get a unique straight line. Different forms of equations of straight line are: Slope-Intercept formPoint-Slo
6 min read
Real World Applications of Slope Intercept Form of Line
The slope-intercept form of a linear equation, y = mx + b, is a fundamental mathematical concept with various real-life applications. This form represents a straight line where 'm' is the slope and 'b' is the y-intercept. The slope indicates the rate of change, while the y-intercept is the point where the line intersects the y-axis. What is Slope-I
9 min read
How to Find the Slope of a Tangent Line?
To find the slope of the tangent line, we should have a clear concept of tangent lines and slope. The slope is defined as the ratio of the difference in y coordinate to the difference in x coordinate. It is represented by the following formula: m =( y⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠2 - y⁠⁠⁠⁠⁠⁠⁠1 ) /(x⁠⁠⁠⁠⁠⁠⁠2 - x⁠⁠⁠⁠⁠⁠⁠1) It is to be noted that: tan Îļ is the same as
4 min read
How to Find the Slope of a Line From Its Graph
Slope of a line is the measure of its inclination with the positive x-axis. Mathematically, the slope is defined as “rise over run”. The slope is the measure of the inclination or slant of the line, whether it is rising or falling. In this article, we will be discussing how to calculate the slope of a line on a graph, with an easy-to-understand for
10 min read
Practice Questions on Slope of a line
Slope of a line is an essential concept for anyone studying coordinate geometry. Slope of a line indicates its steepness or incline. It shows how much the line rises or falls when moving horizontally from one place to another. This article will provide you a clear understanding of the concept along with a collection of practice questions on Slope o
8 min read
Slope of the Secant Line Formula
Understanding the Slope of the Secant Line FormulaThe slope of the secant line between two points on a curve is a fundamental concept in calculus. The secant line is a straight line connecting two distinct points on the graph of a function. The slope of this line provides an average rate of change of the function between those two points. A secant
6 min read
Point-slope Form - Straight Lines | Class 11 Maths
There are several forms to represent the equation of a straight line on the two-dimensional coordinate plane. Three major of them are point-slope form, slope-intercept form, and general or standard form. The point-slope form includes the slope of the straight line and a point on the line as the name suggests. There can be infinite lines with a give
9 min read
Writing Slope-Intercept Equations
Straight-line equations, also known as "linear" equations, have simple variable expressions with no exponents and graph as straight lines. A straight-line equation is one that has only two variables: x and y, rather than variables like y2 or √x. Because it contains information about these two properties, one type of straight-line equation is called
10 min read
Undefined Slope
Undefined Slope as the name suggests is the slope of any curve or line where the change in vertical direction became exponentially too large compared to horizontal direction. Undefined Slope of any line or curve becomes increasingly steep, and its slope cannot be expressed as a finite numerical value. In this article, we will discuss about undefine
8 min read
Slope Formula
Slope formula is used to determine the steepness or inclination of a line. The x and y coordinates of the points lying on the line are used to calculate the slope of a line. The change in the "y" coordinate concerning the change in the "x" coordinates is called the slope of a line, and it is usually depicted by the letter "m". Table of Content What
7 min read
Slope Intercept Form
The slope-intercept formula is one of the formulas used to find the equation of a line. The slope-intercept formula of a line with slope m and y-intercept b is, y = mx + b. Here (x, y) is any point on the line. It represents a straight line that cuts both axes. Slope intercept form of the equation is used to represent the equation of a straight lin
9 min read
Slope-Intercept Form Practice Problems
Slope-intercept form is a fundamental concept in algebra, crucial for understanding linear equations and their graphs. Represented as [Tex]y=mx+b[/Tex] , where m denotes the slope and b denotes the y-intercept, this form simplifies the process of graphing lines and interpreting linear relationships. This article is designed to help you understand a
6 min read
How to Find the Slope of a Curve at a Given Point?
To find the slope of a curve at a given point, take the derivative of the function to get the slope formula. Then, substitute the x-coordinate of the point into the derivative to find the slope at that specific point. Let's discuss this in detail. Steps to Find the Slope of a Curve at a Given PointStep 1: Identify the FunctionSuppose you have a fun
2 min read
Graphing Slope-Intercept Equations - Straight Lines | Class 11 Maths
To graph a straight line we need at least two points that lie on the straight line. From the slope-intercept form of the given straight line, we can calculate two points on the line very easily using the information present in the equation. Consider a straight line with slope m and y-intercept c. We know the slope-intercept form of the equation of
7 min read
Slope of a Function
Slope of a function is a fundamental concept in mathematics that describes how a function's value changes as its input changes. In simple terms, the slope tells us how steep a line is. The concept of slope is not limited to straight lines. In calculus, we often talk about the slope of a curve at a particular point, which is found using the derivati
9 min read
Slope Intercept Form Worksheet
Slope-intercept form is a way to write the equation of a straight line. It's one of the most commonly used forms because it's straightforward and provides an easy way to graph a line. In this article, we will learn how to solve Slope intercept problems. Table of Content What is Slope intercept form?Important FormulaSolved ProblemsWorksheet: Slope i
7 min read
How to Find Slope From a Graph?
Answer: To find the slope from a graph, divide the change in the y-coordinate (rise) by the change in the x-coordinate (run) between two points on the line.The slope of a line on a graph represents how steep the line is, and it's calculated as the ratio of the vertical change (rise) to the horizontal change (run) between two points on the line. The
2 min read
How to Convert Slope Form into Standard Form?
Equation of the line is represented in various forms such as standard form, slope-intercept form and others, one can easily convert the slope-intercept form of a line to standard form. In this article, we have covered How to Convert the Slope Form of a Line into the Standard Form of a Line and related examples in detail. Table of Content What is Sl
4 min read
Difference between a Line and Line segment
Geometry is the study of shapes or geometrical figures. All the shapes we observe in geometry are made up by the joining of a number of lines. And, lines are the collection of points. This interrelation of points, lines, and shapes makes the study of geometrical figures equally interesting. The article also observes the same topics of geometrical f
3 min read
How to Construct a Line Parallel to a Given Line Through a Given Point
Constructing a line parallel to a given line through a given point is a fundamental task in Geometry. The lines that do not have a common meeting point in the same plane, however far they are extended, are called Parallel lines. To understand this topic of the parallel line clearly, you can take examples of railway tracks, zebra crossings, etc. The
4 min read
Division of Line Segment in Given Ratio - Constructions | Class 10 Maths
Line is a straight one-dimensional figure that has no thickness. In geometry, a line extends endlessly in both directions. It is described as the shortest distance between any two points. A-line can also be understood as multiple points connected to each other in one specific direction without a gap between them. Line Segment is a part of a line th
4 min read
Class 12 RD Sharma Solutions - Chapter 28 The Straight Line in Space - Exercise 28.1 | Set 1
Question 1. Find the vector and Cartesian equation of the line through the points (5, 2, -4) and which is parallel to the vector[Tex]3\hat{i}+2\hat{j}-8\hat{k}.[/Tex] Solution: As we know that the vector equation of a line is; [Tex]\vec{r}=\vec{a}+\lambda\vec{b}[/Tex] Thus, the Cartesian equation of a line is; [Tex]\frac{x-x_1}{a_1}=\frac{y-y_1}{a_
6 min read
Change Line Spacing in MS Word
Line Spacing refers to the amount of space between any two lines in the Word Document. The default size of Line Spacing is 1.08 in MS Word. However, we can add custom line spaces to different lines, paragraphs in our Word Document according to our requirements and ensure quite good readability of our content to others. In MS Word there are multiple
3 min read
In how many ways can 8 men and 8 women stand in a line, alternating in gender?
In mathematics, permutation is known as the process of arranging a set in which all the members of a set are arranged into some series or order. The process of permuting is known as the rearranging of its components if the set is already arranged. Permutations take place, in more or less important ways, in almost every area of mathematics. They fre
4 min read
Find the coordinates of the points of trisection of the line segment joining the points A(2, – 2) and B(– 7, 4)
Mathematics is a subject that is associated with numbers and calculations. And, according to the type of calculation mathematics is divided into different branches like algebra, geometry, arithmetic, etc. Geometry It is the branch of mathematics that deals with shape and their properties. Geometry that deals with points, lines, and planes in which
5 min read
What is a Poverty Line?
The poverty line is the degree of pay to meet the base everyday environments. Poverty line is how much cash is required for an individual to meet his fundamental necessities. It is characterized as the cash worth of the labor and products expected to give essential government assistance to a person. People who are living below the poverty line are
5 min read
How to find the Equation of a Straight Line?
Geometry is a field of mathematics that deals with the size, position, shapes, angles, and dimensions of various things. 2D geometry includes shapes like squares, circles, triangles, hexagons, etc .2D shapes only have 2 dimensions. 3D geometry includes shapes like cubes, cylinders, cones, etc.3D shapes have 3 dimensions. But all these shapes are ma
9 min read
Difference between a Line and a Ray
The word 'geometry' is the English equivalent of the Greek word 'geometron'. 'Geo' means Earth and 'Metron' means Measure. Even today geometric ideas are reflected in many forms of art, measurement, textile, designing, engineering, etc. All objects have different sizes. For example, the geometry of the ruler you use is different from the pencil you
3 min read
Find the ratio in which the point (– 1, 6) divides the line segment joining the points (– 3, 10) and (6, – 8)
Geometry is undeniably one of the most important branches in the field of mathematics. Its significance is as profound as that of arithmetic and algebra, as much in our daily lives, as much as in the technicalities and intricacies of mathematics. Geometry, in daily lives, is basically prevalent everywhere. It is applied in designing a simple tiffin
6 min read