# Normal (geometry)

(Redirected from Normal vector)
A polygon and two of its normal vectors
A normal to a surface at a point is the same as a normal to the tangent plane to the same surface at the same point.

In geometry, a normal is an object such as a line or vector that is perpendicular to a given object. For example, in two dimensions, the normal line to a curve at a given point is the line perpendicular to the tangent line to the curve at the point.

In three dimensions, a surface normal, or simply normal, to a surface at a point P is a vector that is perpendicular to the tangent plane to that surface at P. The word "normal" is also used as an adjective: a line normal to a plane, the normal component of a force, the normal vector, etc. The concept of normality generalizes to orthogonality.

The concept has been generalized to differentiable manifolds of arbitrary dimension embedded in a Euclidean space. The normal vector space or normal space of a manifold at a point P is the set of the vectors which are orthogonal to the tangent space at P. In the case of differential curves, the curvature vector is a normal vector of special interest.

The normal is often used in computer graphics to determine a surface's orientation toward a light source for flat shading, or the orientation of each of the corners (vertices) to mimic a curved surface with Phong shading.

## Normal to surfaces in 3D space

### Calculating a surface normal

For a convex polygon (such as a triangle), a surface normal can be calculated as the vector cross product of two (non-parallel) edges of the polygon.

For a plane given by the equation ${\displaystyle ax+by+cz+d=0}$ , the vector ${\displaystyle (a,b,c)}$  is a normal.

For a plane whose equation is given in parametric form

${\displaystyle \mathbf {r} (\alpha ,\beta )=\mathbf {a} +\alpha \mathbf {b} +\beta \mathbf {c} }$ ,

i.e., a is a point on the plane and b and c are (non-parallel) vectors lying on the plane, the normal to the plane is a vector normal to both b and c which can be found as the cross product ${\displaystyle \mathbf {b} \times \mathbf {c} }$ .

For a hyperplane in n + 1 dimensions, again given by its parametric representation

${\displaystyle \mathbf {r} =\mathbf {a} _{0}+\alpha _{1}\mathbf {a} _{1}+\cdots +\alpha _{n}\mathbf {a} _{n}}$ ,

where a0 is a point on the hyperplane and ai for i = 1, ..., n are non-parallel vectors lying on the hyperplane, a normal to the hyperplane is any vector in the null space of A where A is given by

${\displaystyle A=[\mathbf {a} _{1}\dots \mathbf {a} _{n}]}$ .

That is, any vector orthogonal to all in-plane vectors is by definition a surface normal.

If a (possibly non-flat) surface S is parameterized by a system of curvilinear coordinates x(s, t), with s and t real variables, then a normal is given by the cross product of the partial derivatives

${\displaystyle {\partial \mathbf {x} \over \partial s}\times {\partial \mathbf {x} \over \partial t}.}$

If a surface S is given implicitly as the set of points ${\displaystyle (x,y,z)}$  satisfying ${\displaystyle F(x,y,z)=0}$ , then, a normal at a point ${\displaystyle (x,y,z)}$  on the surface is given by the gradient

${\displaystyle \nabla F(x,y,z).}$

since the gradient at any point is perpendicular to the level set, and ${\displaystyle F(x,y,z)=0}$  (the surface) is a level set of ${\displaystyle F}$ .

For a surface S given explicitly as a function ${\displaystyle f(x,y)}$  of the independent variables ${\displaystyle x,y}$  (e.g., ${\displaystyle f(x,y)=a_{00}+a_{01}y+a_{10}x+a_{11}xy}$ ), its normal can be found in at least two equivalent ways. The first one is obtaining its implicit form ${\displaystyle F(x,y,z)=z-f(x,y)=0}$ , from which the normal follows readily as the gradient

${\displaystyle \nabla F(x,y,z)}$ .

(Notice that the implicit form could be defined alternatively as

${\displaystyle F(x,y,z)=f(x,y)-z}$ ;

these two forms correspond to the interpretation of the surface being oriented upwards or downwards, respectively, as a consequence of the difference in the sign of the partial derivative ${\displaystyle \partial {F}/\partial {z}}$ .) The second way of obtaining the normal follows directly from the gradient of the explicit form,

${\displaystyle \nabla f(x,y)}$ ;
${\displaystyle \nabla F(x,y,z)={\hat {\mathbf {k} }}-\nabla f(x,y)}$ , where ${\displaystyle {\hat {\mathbf {k} }}}$  is the upward unit vector.

This is equal to ${\displaystyle \nabla F(x,y,z)={\hat {\mathbf {k} }}-{\frac {\partial {f(x,y)}}{\partial {x}}}{\hat {\mathbf {i} }}-{\frac {\partial {f(x,y)}}{\partial {y}}}{\hat {\mathbf {j} }}}$ , where ${\displaystyle {\hat {\mathbf {i} }}}$  and ${\displaystyle {\hat {\mathbf {j} }}}$  are the x and y unit vectors.

If a surface does not have a tangent plane at a point, it does not have a normal at that point either. For example, a cone does not have a normal at its tip nor does it have a normal along the edge of its base. However, the normal to the cone is defined almost everywhere. In general, it is possible to define a normal almost everywhere for a surface that is Lipschitz continuous.

### Uniqueness of the normal

A vector field of normals to a surface

A normal to a surface does not have a unique direction; the vector pointing in the opposite direction of a surface normal is also a surface normal. For a surface which is the topological boundary of a set in three dimensions, one can distinguish between the inward-pointing normal and outer-pointing normal, which can help define the normal in a unique way. For an oriented surface, the surface normal is usually determined by the right-hand rule. If the normal is constructed as the cross product of tangent vectors (as described in the text above), it is a pseudovector.

### Transforming normals

Note: in this section we only use the upper 3x3 matrix, as translation is irrelevant to the calculation

When applying a transform to a surface it is often useful to derive normals for the resulting surface from the original normals.

Specifically, given a 3x3 transformation matrix M, we can determine the matrix W that transforms a vector n perpendicular to the tangent plane t into a vector n′ perpendicular to the transformed tangent plane M t, by the following logic:

Write n′ as W n. We must find W.

W n perpendicular to M t

${\displaystyle \iff (Wn)\cdot (Mt)=0}$
${\displaystyle \iff (Wn)^{T}(Mt)=0}$
${\displaystyle \iff (n^{T}W^{T})(Mt)=0}$
${\displaystyle \iff n^{T}(W^{T}M)t=0}$

Clearly choosing W such that ${\displaystyle W^{T}M=I}$ , or ${\displaystyle W={M^{-1}}^{T}}$  will satisfy the above equation, giving a ${\displaystyle Wn}$  perpendicular to ${\displaystyle Mt}$ , or an n′ perpendicular to t′, as required.

Therefore, one should use the inverse transpose of the linear transformation when transforming surface normals. The inverse transpose is equal to the original matrix if the matrix is orthonormal, i.e. purely rotational with no scaling or shearing.

## Hypersurfaces in n-dimensional space

The definition of a normal to a surface in three-dimensional space can be extended to ${\displaystyle (n-1)}$ -dimensional hypersurfaces in a n-dimensional space. A hypersurface may be locally defined implicitly as the set of points ${\displaystyle (x_{1},x_{2},\ldots ,x_{n})}$  satisfying an equation ${\displaystyle F(x_{1},x_{2},\ldots ,x_{n})=0}$ , where ${\displaystyle F}$  is a given scalar function. If ${\displaystyle F}$  is continuously differentiable then the hypersurface is a differentiable manifold in the neighbourhood of the points where the gradient is not null. At these points the normal vector space has dimension one and is generated by the gradient

${\displaystyle \nabla F(x_{1},x_{2},\ldots ,x_{n})=\left({\tfrac {\partial F}{\partial x_{1}}},{\tfrac {\partial F}{\partial x_{2}}},\ldots ,{\tfrac {\partial F}{\partial x_{n}}}\right)\,.}$

The normal line at a point of the hypersurface is defined only if the gradient is not null. It is the line passing through the point and having the gradient as direction.

## Varieties defined by implicit equations in n-dimensional space

A differential variety defined by implicit equations in the n-dimensional space is the set of the common zeros of a finite set of differential functions in n variables

${\displaystyle f_{1}(x_{1},\ldots ,x_{n}),\ldots ,f_{k}(x_{1},\ldots ,x_{n}).}$

The Jacobian matrix of the variety is the k×n matrix whose i-th row is the gradient of fi. By implicit function theorem, the variety is a manifold in the neighborhood of a point of it where the Jacobian matrix has rank k. At such a point P, the normal vector space is the vector space generated by the values at P of the gradient vectors of the fi.

In other words, a variety is defined as the intersection of k hypersurfaces, and the normal vector space at a point is the vector space generated by the normal vectors of the hypersurfaces at the point.

The normal (affine) space at a point P of the variety is the affine subspace passing through P and generated by the normal vector space at P.

These definitions may be extended verbatim to the points where the variety is not a manifold.

### Example

Let V be the variety defined in the 3-dimensional space by the equations

${\displaystyle x\,y=0,\quad z=0\,.}$

This variety is the union of the x-axis and the y-axis.

At a point (a, 0, 0), where a ≠ 0, the rows of the Jacobian matrix are (0, 0, 1) and (0, a, 0). Thus the normal affine space is the plane of equation x = a. Similarly, if b ≠ 0, the normal plane at (0, b, 0) is the plane of equation y = b.

At the point (0, 0, 0) the rows of the Jacobian matrix are (0, 0, 1) and (0, 0, 0). Thus the normal vector space and the normal affine space have dimension 1 and the normal affine space is the z-axis.

## Normal in geometric optics

Diagram of specular reflection

The normal is the line perpendicular to the surface of an optical medium at a given point.[1] In reflection of light, the angle of incidence and the angle of reflection are respectively the angle between the normal and the incident ray (on the plane of incidence) and the angle between the normal and the reflected ray.