Skip to main content
Matthew Litwin

The Dual Basis

The tangent space and the metric lets us do basic calculus at a point on our surface: vector displacements with the metric telling us distances and angles.

The next step is to "do calculus" with scalar functions on our surface. At a point on our surface, we can approximate a scalar function with a Linear Functional These are what we are going to need:

f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y)

f(λx)=λf(x)f(\lambda x)=\lambda f(x)

The Dual Space

If we have a real valued function FF on our surface, we can consider at any point a Linear Functional f on the tangent space VV which approximates it: f(x+y)=f(x)+f(y)f(x+y)=f(x)+f(y) and f(λx)=λf(x)f(\lambda x)=\lambda f(x)

If v=ixieiv = \sum_i x^i e_i then f(v)=iAixif(v) = \sum_i A_i x^i, where Ai=f(ei)A_i = f(e_i)

Conversely we can define a linear functional by its action on the {ei}\{e_i\}

f(v)if(ei)xif(v) \coloneqq \sum_i f(e_i) x^i

The set of our linear functionals on our tangent space is a vector space (it's closed under addition and multiplication by a scalar), and we now see it has the same dimension as the tangent space. It's denoted VV^*

The Dot Product

There is a deep relationship between the Dual Space and the Tangent Space (hence the "dual"). This is through a notion of the dot product, which you can define on the tangent space using the Metric Tensor.

With the Tangent space and the Metric Tensor, we can determine the geometry of our surface in its coordinate system by using the Metric Tensor to define a dot product, which encapsulates the notion of distance of vectors and the angle between vectors.

gij=eiejg_{i j}=e_i \cdot e_j

and if x=xieix=x^i e_i and y=yieiy=y^i e_i, then

xy=gijxiyjx \cdot y = g_{i j} x^i y^j

As special case for a vector v=ixieiv=\sum_i x^i e_i we can define its length

vv=v2=gijxixjv \cdot v = |v|^2 = g_{i j} x^i x^j

and the definition of a scalar product can then define the angle between vectors

xy=xycosθx \cdot y=|x||y|\cos\theta

and a way to project yy onto xx using the component of yy along xx

compxy=xyx\text{comp}_x y = \frac{x \cdot y}{|x|}

projxy=(compxy)x=xyx2x\text{proj}_x y = (\text{comp}_x y) x =\frac{x \cdot y}{|x|^2}x

The Dual Basis

The elements of the Dual Space are linear functionals. But for any vector vv in the Tangent space, we can use it to define a linear function, interpreting it as a linear function where for any tangent space vector xx

v(x)=vx v(x) = v \cdot x

For an orthonormal basis of a vector space, the dot product has a nice property that you can use it to compute the component of any vector vv along a basis vector ee just by taking vev \cdot e

The basis of our tangent space might not be nice in this sense. The {ei}\{e_i\} might not be unit vectors, but more significantly they might not be orthogonal at all.

But we can find such a basis - the dual basis {ei}\{e^i\} where this property holds, and it will be unique.

We want for any vector vv in our tangent space to have components xix^i in {ei}\{e_i\} so that

v=i(vei)eiv = \sum_i (v \cdot e^i) e_i

If it works for any vv, then it should work for each eje_j too, and if it works on the basis vectors, it's going to work for any vv since the dot product is linear. A basis vector eje_j is really a vector whose jj-th component is 11 and the rest 00.

We can write this in terms of the Kronecker delta

δji={1if i=j0if ij\delta^i_j = \begin{cases} 1 & \text{if } i = j \\ 0 & \text{if } i \neq j \end{cases}

Writing out each eje_j in full as a linear combination of all the basis vectors

ej=iδjiei=i(ejei)ei e_j = \sum_i \delta^i_j e_i = \sum_i(e_j \cdot e^i) e_i

Comparing components, we must have

ejei=δjie_j \cdot e^i = \delta^i_j

Expressing the basis {ei}\{e^i\}, we can express the new basis in terms of the tangent basis {ei}\{e_i\} according to some change of basis matrix {αij}\{\alpha^{ij}\}

ei=kαikek e^i = \sum_k \alpha^{ik}e_k

and now dotting with eje_j

δji=ejei=kαik(ejek)=kαikgjk=kαikgkj\delta^i_j = e_j \cdot e^i = \sum_k \alpha^{ik}(e_j \cdot e_k) = \sum_k \alpha^{ik}g_{jk} = \sum_k \alpha^{ik}g_{kj}

Which in matrix terms means

αg=I\mathbf{\alpha} \mathbf{g} = \mathrm{I}

which means that

α=g1={gij} \alpha= g^{-1} = \{g^{ij}\}

αij=gij \alpha^{ij}= g^{ij}

and we can now express the dual basis vectors in terms of the metric tensor and the tangent space basis vectors

ei=jgijej e^i = \sum_j g^{ij}e_j

Two interpretations of the Dual Basis

Vectors in the tangent space are naturally thought of as column vectors, taking for v=ixieiv=\sum_i x^i e_i the column vector

x= [x1xn]x=\ \begin{bmatrix} x^1 \\ \vdots \\ x^n \end{bmatrix}

A linear transformation on the tangent space has a straightforward formulation as matrix multiplication.

v=Avv' = \mathbf{A}v

Now the dual basis {ei}\{e^i\} of the Dual Space, which is a space of linear functionals, which means we interpret eie^i as the functional with

ei(ej)=δjie^i(e_j) = \delta^i_j

But also the {ei}\{e^i\} are actual vectors in our tangent space, computed by

ei=jgijeje^i = \sum_j g^{ij}e_j

with the defining relationship

eiej=δjie^i \cdot e_j = \delta^i_j

So we can also think of them as column vector in the tangent space itself. This is somewhat less direct than when you start with tangent vectors, so I will write them (in a nonstandard way) with a hat ei^\hat{e^i} when thinking of them not as functionals but as vectors living in the tangent space.

ei^= [gi1gin]\hat{e^i}=\ \begin{bmatrix} g^{i1} \\ \vdots \\ g^{in} \end{bmatrix}

and for a general f=iαieif=\sum_i \alpha_i e^i,

f^=iαiei^\hat{f}= \sum_i \alpha_i \hat{e^i}

and taking α\alpha as a column vector

α= [α1αn]\alpha=\ \begin{bmatrix} \alpha_1 \\ \vdots \\ \alpha_n \end{bmatrix}

we can write our linear function ff in terms of the column vector α\alpha

f(v)=αTxf(v) = \alpha^T x

For a linear transformation f=Aff' = \mathbf{A}f, of f=iαieif=\sum_i \alpha_i e^i, the matrix form is a little different than with the tangent space

f(v)=(Aα)Tx=αTATxf'(v) = (\mathbf{A}\alpha)^T x = \alpha^T \mathbf{A}^T x

So transforming f^\hat{f} by A\mathbf{A} is equivalent to transforming the input vectors xx by AT\mathbf{A}^T, and vice-versa.

Next Up

Next up is the gradient