Skip to main content
Mathematics LibreTexts

3.1: Tangent Lines

  • Page ID
    139441
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Everyone knows that the Earth is not flat, but locally, e.g. in your immediate vicinity, isn’t the Earth effectively flat? In other words, “flat” is a fairly good approximation of the Earth’s surface “near” you, and it simplifies matters enough for you to do some useful things.

    This idea of approximating curved shapes by straight shapes is a frequent theme in calculus. Recall from Chapter 1 that by the Microstraightness Property a differentiable curve \(y = f(x)\) actually is a straight line over an infinitesimal interval, having slope \(\dydx\). The extension of that line to all values of \(x\) is called the tangent line:

    Figure [fig:tangentline] on the right shows the tangent line to a curve \(y = f(x)\) at a point \(P\). If you were to look at the curve near \(P\) with a microscope, it would look almost identical to its tangent line through \(P\). Why is this line—of all possible lines through \(P\)—such a good approximation of the curve near \(P\)? It is because at the point \(P\) the tangent line and the curve both have the same rate of change, namely, \(f'(a)\). So the curve’s values and the line’s values change by roughly the same amount slightly away from \(P\) (where the line and curve have the same value), making their values nearly equal.

    Example \(\PageIndex{1}\): tangentline1

    Find the tangent line to the curve \(y = x^2\) at \(x = 1\).

    Solution

    By formula ([eqn:tangentline]), the equation of the tangent line is

    \[y ~-~ f(a) ~=~ f'(a) \cdot (x - a) \nonumber \]

    with \(a = 1\) and \(f(x) = x^2\). So \(f(a) = f(1) = 1^2 = 1\). Both the curve \(y = x^2\) and the tangent line pass through the point \((1, f(1)) = (1,1)\). The derivative of \(f(x) = x^2\) is \(f'(x) = 2x\), so \(f'(a) = f'(1) = 2(1) = 2\), which is the slope of the tangent line at \((1,1)\). Hence, the equation of the tangent line is \(y - 1 = 2(x - 1)\), or (in slope-intercept form) \(y = 2x - 1\).

    The curve and tangent line are shown in Figure [fig:tangentline1]. Near the point \((1,1)\) the curve and tangent line are close together, but the separation grows farther from that point, especially in the negative \(x\) direction.

    In trigonometry you probably learned about tangent lines to circles, where a tangent line is defined as the unique line that touches the circle at only one point, as in the figure on the right. In this case the tangent line is always on one side of the circle, namely, the exterior of the circle; it does not cut through the interior of the circle. In fact, that definition is a special case of the calculus definition. In general, though, the tangent line to any other type of curve will not necessarily be on only one side of the curve, as it was in Example

    Example \(\PageIndex{1}\): tangentline1

    Add text here.

    Solution

    Example \(\PageIndex{1}\): tangentline2

    Find the tangent line to the curve \(y = x^3\) at \(x = 0\).

    Solution

    Use formula ([eqn:tangentline]) with \(a = 0\) and \(f(x) = x^3\). Then \(f(a) = f(0) = 0^3 = 0\). The derivative of \(f(x) = x^3\) is \(f'(x) = 3x^2\), so \(f'(a) = f'(0) = 3(0)^2 = 0\). Hence, the equation of the tangent line is \({y - 0 = 0(x - 0)}\), which is \(y = 0\). In other words, the tangent line is the \(x\)-axis itself.

    As shown in Figure [fig:tangentline2], the tangent line cuts through the curve. In general it is possible for a tangent line to intersect the curve at more than one point, depending on the function.

    Example \(\PageIndex{1}\): tangentline3

    Find the tangent line to the curve \(y = \sin\,x\) at \(x = 0\).

    Solution

    Use formula ([eqn:tangentline]) with \(a = 0\) and \(f(x) = \sin\,x\). Then \(f(a) = f(0) = \sin\,0 = 0\). The derivative of \(f(x) = \sin\,x\) is \(f'(x) = \cos\,x\), so \(f'(a) = f'(0) = \cos\,0 = 1\). Hence, the equation of the tangent line is \({y - 0 = 1(x - 0)}\), which is \(y = x\), as in Figure [fig:tangentline3]. Near \(x = 0\), the tangent line \(y = x\) is close to the line \(y = \sin\,x\), which was shown in Section 1.3 (namely, \(\sin\,\dx = \dx\), so that \(\sin\,x \approx x\) for \(x \ll 1\)).

    There are several important things to note about tangent lines:

    • The slope of a curve’s tangent line is the slope of the curve.
      Since the slope of a tangent line equals the derivative of the curve at the point of tangency, the slope of a curve at a particular point can be defined as the slope of its tangent line at that point. So curves can have varying slopes, depending on the point, unlike straight lines, which have a constant slope. An easy way to remember all this is to think “slope = derivative.”
    • The tangent line to a straight line is the straight line itself.
      This follows easily from the definition of a tangent line, but is also easy to see with the “slope = derivative” idea: a straight line’s slope (i.e. derivative) never changes, so its tangent line—having the same slope—will be parallel and hence must coincide with the straight line (since they have the points of tangency in common). For example, the tangent line to the straight line \(y = -3x + 2\) is \(y = -3x + 2\) at every point on the straight line.
    • The tangent line can be thought of as a limit of secant lines.
      A secant line to a curve is a line that passes through two points on the curve. Figure [fig:secantline] shows a secant line \(L_{PQ}\) passing through the points \(P = (x_0,f(x_0))\) and \(Q = (w,f(w))\) on the curve \(y = f(x)\),

      As the point \(Q\) moves along the curve toward \(P\), the line \(L_{PQ}\) approaches the tangent line \(T_P\) at the point \(P\), provided the curve is smooth at \(P\) (i.e. \(f'(x_0)\) exists). This is because the slope of \(L_{PQ}\) is \((f(w) - f(x_0))/(w - x_0)\), and so

      \[\lim_{Q \to P} ~ \left(\text{slope of } L_{PQ}\right) ~=~ \lim_{w \to x_0} ~\frac{f(w) ~-~ f(x_0)}{w ~-~ x_0} ~=~ f'(x_0) ~=~ \text{slope of } T_P \nonumber \]

      which means that as \(Q\) approaches \(P\) the “limit” of the secant line \(L_{PQ}\) has the same slope and goes through the same point \(P\) as the tangent line \(T_P\).

    • Smooth curves have tangent lines, nonsmooth curves do not.
      For example, think of the absolute value function \(f(x) = \abs{x}\). Its graph has a sharp edge at the point \((0,0)\), making it nonsmooth there, as shown in Figure [fig:tangentnonsmooth](a) below. There is no real way to define a tangent line at \((0,0)\), because as mentioned in Section 1.2, the derivative of \(f(x)\) does not exist at \(x = 0\). The same holds true for curves with cusps, as in Figure [fig:tangentnonsmooth](b).

      Many lines go through the point of nonsmoothness, some of which are indicated by the dashed lines in the above figures, but none of them can be the tangent line. Sharp edges and cusps have to be “smoothed out” to have a tangent line.

    As a point moves along a smooth curve, the corresponding tangent lines to the curve make varying angles with the positive \(x\)-axis—the angle is thus a function of \(x\). Let \(\phi = \phi(x)\) be the smallest angle that the tangent line \(L\) to a curve \(y = f(x)\) makes with the positive \(x\)-axis, so that \(-90\Degrees < \phi(x) <90\Degrees\) for all \(x\) (see Figure [fig:tangentangle]).

    As Figure [fig:tangentangle] shows, \(-90\Degrees < \phi(x) < 0\Degrees\) when the tangent line \(L\) has negative slope, \(0\Degrees < \phi(x) < 90\Degrees\) when \(L\) has positive slope, and \(\phi(x)=0\Degrees\) when \(L\) is horizontal (i.e. has zero slope). The slope of a line is usually defined as the rise divided by the run in a right triangle, as shown in the figure on the right. The figure shows as well that by definition of the tangent of an angle, \(\tan\,\phi(x)\) also equals the rise (opposite) over run (adjacent). Thus, since the slope of \(L\) is \(f'(x)\), this means that \(\tan\,\phi(x) = f'(x)\). In other words:

    Example \(\PageIndex{1}\): tangentangle

    Find the angle \(\phi\) that the tangent line to the curve \(y=e^{2x}\) at \(x = -\frac{1}{2}\) makes with the positive \(x\)-axis, such that \(-90\Degrees < \phi < 90\Degrees\).

    Solution

    The angle is \(\phi = \phi(-1/2) = \tan^{-1} f`(-1/2)\), where \(f(x) = e^{2x}\). Since \(f'(x) = 2e^{2x}\), then

    \[\phi ~=~ \phi(-1/2) ~=~ \tan^{-1} f`(-1/2) ~=~ \tan^{-1} 2e^{-1} ~=~ \tan^{-1} 0.7358 ~=~ 36.3\Degrees ~. \nonumber \]

    The figure on the right shows the tangent line \(L\) to the curve at \(x = -\frac{1}{2}\) and the angle \(\phi\).

    You learned about perpendicular lines in elementary geometry. Figure [fig:normalline] shows the natural way to define how a line \(N\) can be perpendicular to a curve \(y=f(x)\) at a point \(P\) on the curve: the line is perpendicular to the tangent line of the curve at \(P\). Call this line \(N\) the normal line to the curve at \(P\). Since \(N\) and \(L\) are perpendicular, their slopes are negative reciprocals of each other (provided neither slope is 0). The equation of the normal line follows easily:

    Example \(\PageIndex{1}\): normalline

    Find the normal line to the curve \(y = x^2\) at \(x = 1\). (Note: This is the curve from Example.)

    Solution

    The equation of the normal line is

    \[y ~-~ f(a) ~=~ -\frac{1}{f'(a)} \cdot (x - a) \nonumber \]

    with \(a = 1\), \(f(x) = x^2\), and \(f'(x) = 2x\). So \(f(a) = 1\) and \(f'(a) = 2\). Hence, the equation of the normal line is \(y - 1 = -\frac{1}{2}(x - 1)\), or (in slope-intercept form) \(y = -\frac{1}{2}x + \frac{3}{2}\).

    [sec3dot1

    For Exercises 1-12, find the equation of the tangent line to the curve \(y = f(x)\) at \(x = a\).

    3

    \(f(x) ~=~ x^2 ~+~ 1\); at \(x = 2\)

    \(f(x) ~=~ x^2 ~-~ 1\); at \(x = 2\)

    \(f(x) ~=~ -x^2 ~+~ 1\); at \(x = 3\)

    3

    \(f(x) ~=~ 1\); at \(x = -1\)

    \(f(x) ~=~ 4x\); at \(x = 1\)

    \(f(x) ~=~ e^x\); at \(x = 0\)

    3

    \(f(x) ~=~ x^2 ~-~ 3x ~+~ 7\); at \(x = 2\vphantom{\dfrac{x ~+~ 1}{x ~-~ 1}}\)

    \(f(x) ~=~ \dfrac{x ~+~ 1}{x ~-~ 1}\); at \(x = 0\)

    \(f(x) ~=~ (x^3 ~+~ 2x ~-~ 1)^3\); at \(x = -1\vphantom{\dfrac{x ~+~ 1}{x ~-~ 1}}\)

    3

    \(f(x) ~=~ \tan\,x\); at \(x = 0\)

    \(f(x) ~=~ \sin\,2x\); at \(x = 0\)

    \(f(x) ~=~ \sqrt{1 ~-~ x^2}\); at \(x = 1/\sqrt{2}\)

    Find the equations of the tangent lines to the curve \(y = x^3 - 2x^2 + 4x + 1\) which are parallel to the line \(y = 3x - 5\).

    Draw an example of a curve having a tangent line that intersects the curve at more than one point. For Exercises 15-17, find the angle \(\phi\) that the tangent line to the curve \(y=f(x)\) at \(x=a\) makes with the positive \(x\)-axis, such that \(-90\Degrees < \phi < 90\Degrees\). [[1.]]

    3

    \(f(x) ~=~ x^2\); at \(x = 2\)

    \(f(x) ~=~ \cos\,2x\); at \(x = \pi/6\)

    \(f(x) ~=~ x^2 ~+~ 2x ~-~ 3\); at \(x = -1\)

    Show that if \(\phi(x)\) is the angle that the tangent line to a curve \(y = f(x)\) makes with the positive \(x\)-axis such that \(0\Degrees \le \phi(x) < 180\Degrees\), then

     

    \[\phi(x) ~=~ \begin{cases} ~\cos^{-1} \left(\dfrac{1}{\sqrt{1 ~+~ (f'(x))^2}}\right) & \text{when $f'(x) \ge 0$}\

     

    \[12pt] ~\cos^{-1} \left(\dfrac{-1}{\sqrt{1 ~+~ (f'(x))^2}}\right) & \text{when $f'(x) < 0$.} \end{cases} \nonumber \]

    (Hint: Draw a right triangle.) For Exercises 19-21, find the angle \(\phi\) that the tangent line to the curve \(y=f(x)\) at \(x=a\) makes with the positive \(x\)-axis, such that \(0\Degrees \le \phi < 180\Degrees\). [[1.]]

    3

    \(f(x) ~=~ x^2\); at \(x = -1\)

    \(f(x) ~=~ e^{-x}\); at \(x = 1\)

    \(f(x) ~=~ \ln 2x\); at \(x = 10\)

    For Exercises 22-24, find the equation of the normal line to the curve \(y = f(x)\) at \(x = a\). [[1.]]

    3

    \(f(x) ~=~ \sqrt{x}\); at \(x = 4\)

    \(f(x) ~=~ x^2 ~+~ 1\); at \(x = 2\)

    \(f(x) ~=~ x^2 ~-~ 7x ~+~ 4\); at \(x = 3\)

    Find the equations of the normal lines to the curve \(y = x^3 - 2x^2 - 11x + 3\) which have a slope of \(-\frac{1}{4}\). [[1.]]

    Show that the area of the triangle formed by the \(x\)-axis, the \(y\)-axis, and the tangent line to the curve \(y = 1/x\) at any point \(P\) is constant (i.e. the area is the same for all \(P\)).

    For a constant \(a > 0\), let \(P\) be a point on the curve \(y = ax^2\), and let \(Q\) be the point where the tangent line to the curve at \(P\) intersects the \(y\)-axis. Show that the \(x\)-axis bisects the line segment \(\overline{PQ}\).

    Let \(P\) be a point on the curve \(y = 1/x\) in the first quadrant, and let \(Q\) be the point where the tangent line to the curve at \(P\) intersects the \(x\)-axis. Show that the triangle \(\Delta\,POQ\) is isosceles, where \(O\) is the origin.


    1. For example, see Section 2.2 in Protter, M.H. and C.B. Morrey, A First Course in Real Analysis, New York: Springer-Verlag, 1977.↩
    2. For a proof, see pp.89-91 in Protter, M.H. and C.B. Morrey, A First Course in Real Analysis, New York: Springer-Verlag, 1977.↩
    3. See p.154-159 in French, A.P., Special Relativity, Surrey, U.K.: Thomas Nelson & Sons Ltd., 1968.↩
    4. The full proofs require some advanced results. See pp.97-98 and p.558 in Taylor, A.E. and W.R. Mann, Advanced Calculus, 2nd ed., New York: John Wiley & Sons, Inc., 1972.↩
    5. For example, see Section 12.2 in Buchmann, J.A., Introduction to Cryptography, New York: Springer-Verlag, 2001.↩
    6. See the documentation at http://www.gnuplot.info/documentation.html
    7. More accurately, many current calculus textbooks never mention them. Calculus texts up through the 1930s or so not only mentioned infinitesimals but used them extensively, even to the point of the texts themselves having titles such as Introduction to Infinitesimal Calculus.↩
    8. Though often in an unclear and sometimes confusing and misleading manner, as will be seen later in this section.↩
    9. For other formulations see Chapter 1 in Rosser, J.B., R.R. Newton and G.L. Gross, Mathematical Theory of Rocket Flight, New York: McGraw-Hill Book Company, Inc., 1947.↩
    10. For an excellent overview on this subject, see Dray, T. and C.A. Manogue, Putting Differentials Back into Calculus, College Math. J. 41 (2010), 90100. Some of the material in this section is indebted to that paper, which is available at www.math.oregonstate.edu/bridge/papers/differentials.pdf↩

    This page titled 3.1: Tangent Lines is shared under a GNU General Public License 3.0 license and was authored, remixed, and/or curated by Michael Corral via source content that was edited to the style and standards of the LibreTexts platform.