Main content

### 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?

## Background

## What we're building to

- A
**unit normal vector**to a two-dimensional curve is a vector with magnitude that is perpendicular to the curve at some point.$1$ - 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**, which involves swapping the coordinates and making one of them negative.${90}^{\circ}$ **Normalize the result**, which requires dividing it by its own magnitude.

- Abstractly speaking, the result you get will look something like this:For a given tiny step along the curve, think of
as the$dx$ -component of that step,$x$ as the$dy$ -component of that step, and$y$ as the length of that step.$ds$

## Example: Normal vectors to a sine curve

Consider the graph of the function $f(x)=\mathrm{sin}(x)$ .

Imagine you want a function that gives you $1$ .

**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 magnitudeThis 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$ :

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 $\overrightarrow{\mathbf{\text{v}}}(t)$ .

## 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:

For example, if you plug in $t=\pi $ to this function, you get the following vector:

When you move this vector so that its tail sits at the point $\overrightarrow{\mathbf{\text{v}}}(\pi )$ , which for our sine curve is $(\pi ,0)$ , it will be tangent to the curve.

## Step 2: Rotate this vector ${90}^{\circ}$

To turn a tangent vector into a normal vector, rotate it by ${90}^{\circ}$ . How do you do this? Swap the two components and make one of them negative:

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:

## Step 3: Scale it to magnitude $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:Therefore, our unit normal vector function ${\hat{\mathbf{\text{n}}}}(t)$ looks like this:

## 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:**Step 2**: Rotate this vector by swapping the coordinates and making one negative.${90}^{\circ}$ **Step 3**: To make this a*unit*normal vector, divide it by its magnitude:

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 $ds=\sqrt{d{x}^{2}+d{y}^{2}}$ . In this terminology, you might instead write down the unit normal vector like this:

## Want to join the conversation?

- How to calculate a normal to a surface in 3D? in nD?(6 votes)
- That's a plane, so you have ax+by+cz=d. The normal is (a,b,c) of the plane. That's the easiest thing you may find, another is to paramterize the plane, too.(9 votes)

- When do I know whether I should rotate the tangential vector clockwise or anti-clockwise? When I use this method to find the outward normal unit vector for a circle (such as the one in the previous chapter, the result becomes an inward normal unit vector instead.(9 votes)
- this is too complicated. an easier way is to rewrite the function as y-sin(x)=0. and then find grad f = (-cos(x), 1). and we know that grad f is perpendicular to contour lines - so it is your normal vector.(8 votes)
- Feel like this article should come before the "Flux in two dimensions" one(6 votes)
- Wouldn't the outward normal vector be <y'(t),-x'(t)> (rotating the tangent vector clockwise) for positively oriented curves?(2 votes)
- Why are the unit normal vectors not pointed towards the center of curvature?(1 vote)
- *how to know if we need to negate the top or the bottom?*

I was re-doing the calculations knowing the formula for the unit normal vector, and I got n(r(t)) = [-3cos(t)/3, -3sin(t)/3], the negative of what Grant got. The article mentioned that if the top sign is reversed, it goes anti-clockwise, and visaversa if we reverse the bottom sign, but if you don't have a visual representation of the graph, how can you tell?

p.s the final answer comes out the same just negative(atleast for this example)(0 votes)- Which direction you choose is up to you. This is because a point on a curve in 2D actually has 2 unit normal vectors pointing in the opposite direction. But once you use a convention, it's better to just stick with it throughout the problem at hand.(1 vote)