If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Multivariable calculus

### Course: Multivariable calculus>Unit 4

Lesson 4: Line integrals in vector fields (articles)

# Constructing a unit normal vector to curve

Given a curve in two dimensions, how do you find a function which returns unit normal vectors to this curve?

## What we're building to

• A unit normal vector to a two-dimensional curve is a vector with magnitude 1 that is perpendicular to the curve at some point.
• Typically you look for a function that gives you all possible unit normal vectors of a given curve, not just one vector.
• To find the unit normal vector of a two-dimensional curve, take the following steps:
• Find the tangent vector, which requires taking the derivative of the parametric function defining the curve.
• Rotate that tangent vector 90, degrees, which involves swapping the coordinates and making one of them negative.
• Normalize the result, which requires dividing it by its own magnitude.
• Abstractly speaking, the result you get will look something like this:
$\displaystyle \dfrac{1}{ds} \left[ \begin{array}{c} -dy \\ dx \end{array} \right]$
For a given tiny step along the curve, think of d, x as the x-component of that step, d, y as the y-component of that step, and d, s as the length of that step.

## Example: Normal vectors to a sine curve

Consider the graph of the function f, left parenthesis, x, right parenthesis, equals, sine, left parenthesis, x, right parenthesis.
Imagine you want a function that gives you unit normal vectors to this curve (perhaps because you wish to compute flux through it). In other words, for any point on the curve, you want to be able to give the coordinates of a vector perpendicular to that curve with magnitude 1.
This means you want an expression that can take any point on the curve, and return a vector with magnitude 1 that is perpendicular to the curve at that point.

## Step 0: Parameterize

Before anything, we need to make sure our curve is in parametric form. Turning a function graph into a parametric function is simple enough. We let the parameter t play the role of x:
$\displaystyle \vec{\textbf{v}}(t) = \left[ \begin{array}{c} t \\ \sin(t) \end{array} \right]$
I call this "Step 0" because often your curve is initially defined parametrically in the first place, so this would be given to you for free.
What this means for our unit normal vector is that we will find a second vector-valued function which also takes in t, but instead of outputting points on the sine curve itself, its outputs will be unit vectors normal to the curve at the point start bold text, v, end bold text, with, vector, on top, left parenthesis, t, right parenthesis.

## Step 1: Find a tangent vector

When you take the derivative of the parametric function, it will give you a tangent vector to the curve:
If this seems unfamiliar, consider reviewing the article on derivatives of vector-valued functions.
For our example, here's what that looks like:
$\displaystyle \dfrac{d \vec{\textbf{v}}}{dt} = \left[ \begin{array}{c} \dfrac{d}{dt}(t) \\\\ \dfrac{d}{dt}(\sin(t)) \end{array} \right] = \left[ \begin{array}{c} 1 \\ \cos(t) \end{array} \right]$
For example, if you plug in t, equals, pi to this function, you get the following vector:
$\displaystyle \dfrac{d \vec{\textbf{v}}}{dt}(\pi) = \left[ \begin{array}{c} 1 \\ \cos(\pi) \end{array} \right] = \left[ \begin{array}{c} 1 \\ -1 \end{array} \right]$
When you move this vector so that its tail sits at the point start bold text, v, end bold text, with, vector, on top, left parenthesis, pi, right parenthesis, which for our sine curve is left parenthesis, pi, comma, 0, right parenthesis, it will be tangent to the curve.

## Step 2: Rotate this vector $90^\circ$90, degrees

To turn a tangent vector into a normal vector, rotate it by 90, degrees. How do you do this? Swap the two components and make one of them negative:
$\displaystyle \left[ \begin{array}{c} x \\ y \end{array} \right] \rightarrow \left[ \begin{array}{c} -y \\ x \end{array} \right]$
How do you choose which component to make negative? If you are rotating counterclockwise, make the first component negative; if you are rotating clockwise, make the second component negative.
In our example, let's rotate the tangent vector counterclockwise so that it points up:
$\displaystyle \underbrace{ \left[ \begin{array}{c} 1 \\ \cos(t) \end{array} \right] }_{\text{Tangent vector}} \rightarrow \underbrace{ \left[ \begin{array}{c} -\cos(t) \\ 1 \end{array} \right] }_{\text{Normal vector}}$

## Step 3: Scale it to magnitude $1$1

Great! We have a normal vector. But to make this a unit normal vector, we must divide it by its own magnitude. In our example, the magnitude is as follows:
$\displaystyle \left|\left| \left[ \begin{array}{c} -\cos(t) \\ 1 \end{array} \right] \right|\right| = \sqrt{\cos^2(t) + 1^2}$
Therefore, our unit normal vector function start color #0d923f, start bold text, n, end bold text, with, hat, on top, end color #0d923f, left parenthesis, t, right parenthesis looks like this:
$\displaystyle \greenE{\hat{\textbf{n}}}(t) = \left[ \begin{array}{c} -\cos(t) / \sqrt{\cos^2(t) + 1^2} \\\\ 1 / \sqrt{\cos^2(t) + 1^2} \end{array} \right]$

## Summary

Let's generalize the steps of this example to see how they apply to any parametric curve.
• Step 0: Make sure the curve is given parametrically
• Step 1: Find a tangent vector to your curve by differentiating the parametric function:
$\displaystyle \dfrac{d\vec{\textbf{v}}}{dt} = \left[ \begin{array}{c} x'(t) \\ y'(t) \end{array} \right]$
• Step 2: Rotate this vector 90, degrees by swapping the coordinates and making one negative.
$\displaystyle \underbrace{ \left[ \begin{array}{c} x'(t) \\ y'(t) \end{array} \right] }_{\text{Tangent vector}} \rightarrow \underbrace{ \left[ \begin{array}{c} -y'(t) \\ x'(t) \end{array} \right] }_{\text{Normal vector}}$
• Step 3: To make this a unit normal vector, divide it by its magnitude:
$\displaystyle \dfrac{1}{\sqrt{x'(t)^2 + y'(t)^2}} \left[ \begin{array}{c} -y'(t) \\ x'(t) \end{array} \right]$
If you prefer, you can think in terms of differentials, with a tiny step along the curve being represented by the vector $\left[\begin{array}{c} dx \\dy \end{array}\right]$. The magnitude of this step is d, s, equals, square root of, d, x, squared, plus, d, y, squared, end square root. In this terminology, you might instead write down the unit normal vector like this:
$\displaystyle \greenE{\hat{\textbf{n}}} = \dfrac{1}{ds} \left[ \begin{array}{c} -dy \\ dx \end{array} \right]$