News (2018-01-05): glossaries-extra v1.26 released.

## 9.4.11 Vectors

A variable representing a vector can be typeset using the command:

\vec{<variable>}

Example:

Vectors are often typeset in bold. This can be done by redefining the \vec command. You could use \mathbf, for example:

However, as you may have noticed, the Greek letter has not come out in bold. Here's an alternative (using \boldsymbol defined in the amsfonts package):

Located (or position) vectors, on the other hand, are usually typeset with a right arrow, but the default definition of \vec produces an arrow that is too small:

Instead, use \overrightarrow (Table 9.10):

You might prefer to define separate commands for a located vector and a vector variable.

Example:

In the preamble, define \lvec for a located vector and \bvec for a vector variable:

Later in the document:

Let $\bvec{u}=(x, y)$ represent $\lvec{OP}$, then
$\lVert \bvec{u} \rVert = \sqrt{x^2 + y^2}$

Exercise 23: Maths: Vectors and Arrays

Try to produce the following:

As before, you can download or view the solution.

This book is also available as A4 PDF or 12.8cm x 9.6cm PDF or paperback (ISBN 978-1-909440-00-5).

Last modified: 2017-02-06.

The free resources on this site are funded by book sales, not by adverts. If you would like to help keep this site free of annoying third-party ads, please consider buying a book.

© 2012 Dickimaw Books. "Dickimaw", "Dickimaw Books" and the Dickimaw parrot logo are trademarks. The Dickimaw parrot was painted by Magdalene Pritchett.