# Vector Analysis

Vector analysis forms the basis of many physical and mathematical models. The Wolfram Language can compute the basic operations of gradient, divergence, curl, and Laplacian in a variety of coordinate systems. Moreover, these operators are implemented in a quite general form, allowing them to be used in different dimensions and with higher-rank tensors.

## Vector Analysis in Cartesian Coordinates

### Vector Derivatives

The four basic vector derivatives are shown in the following table.

Grad[f,{x_{1},…,x_{n}}] | gradient of a scalar function |

Div[{f_{1},…,f_{n}},{x_{1},…,x_{n}}] | divergence of a vector-valued function |

Curl[{f_{1},…,f_{n}},{x_{1},…,x_{n}}] | curl of a vector-valued function |

Laplacian[f,{x_{1},…,x_{n}}] | Laplacian of a scalar function |

Classical vector derivative operators in Cartesian coordinates.

Although these operators are available in any dimension, they are most commonly encountered in three dimensions.

The following examples explore these operators in dimensions other than three.

The meaning of the curl in dimensions other than three is discussed more fully in the next subsection.

### Generalization to Higher-Rank Tensors

All four operators introduced in the previous subsection are general operators that can take vectors and higher-rank tensors as input. For Curl in dimension , the input can be a scalar, vector, or tensor of rank up to . For the other functions, the allowed rank of input tensors is unlimited.

## Vector Analysis in Non-Cartesian Coordinates

### Known Coordinate Charts

The Wolfram Language contains information about a large number of coordinate charts. The function CoordinateChartData provides a mechanism for retrieving this information.

CoordinateChartData[{"coordsys",n}] | standard name for -dimensional Euclidean chart |

CoordinateChartData[{All,n}] | available coordinate charts in -dimensional Euclidean space |

CoordinateChartData[{All,All,n}] | available coordinate charts in -dimensional space |

CoordinateChartData[chart,"prop"] | property "prop" for the specified coordinate chart |

CoordinateChartData[chart,"prop",pt] | property "prop" for the specified coordinate chart at the point pt |

Information about coordinate charts.

The following examples show how to look up available coordinate charts. In their most general form, coordinate chart specifications contain a coordinate system name, a metric, and a dimension. Note that many charts require parameters. These can be specified or left at the shown defaults.

Although the coordinate chart standard names are quite long, it is typically possible to omit "Euclidean" and the dimension when using Euclidean coordinate charts.

CoordinateChartData contains many properties regarding the different coordinate charts. The most fundamental is the metric, which ultimately determines all lengths and volumes in the coordinate chart. However, in the context of vector analysis in orthogonal coordinates, it is more common to consider the scale factors and volume factor.

In[33]:= |

### Vector Derivatives in Non-Cartesian Coordinates

The four vector derivative operators work in any coordinate chart. It is only necessary to specify the chart in the third argument of the function.

Grad[f,{x_{1},…,x_{n}},chart] | gradient in the specified coordinate chart |

Div[{f_{1},…,f_{n}},{x_{1},…,x_{n}},chart] | divergence in the specified coordinate chart |

Curl[{f_{1},…,f_{n}},{x_{1},…,x_{n}},chart] | curl in the specified coordinate chart |

Laplacian[f,{x_{1},…,x_{n}},chart] | Laplacian in the specified coordinate chart |

Vector analysis operators in non-Cartesian coordinates.

Arrays are treated in these commands as components in the orthonormal basis. This applies to both input and output. As a result, the physical dot product can be computed using Dot.

### Classical Definitions

As seen above, the gradient of a scalar in orthogonal coordinates involves the partial derivatives and the scale factors. There are similar definitions for the divergence of a vector, the Laplacian of a scalar, and the curl of a vector in terms of the scale factors and volume factor.