How to create a cross product symbol in LaTeX

How to create a cross product symbol in LaTeX

This post may contain affiliate links that allow us to earn a commission at no expense to you. Learn more

This article aims to show you a simple way to create a cross product symbol in LaTeX.

LaTeX most of the time is used to write documents that include many mathematics operations and procedures. And when dealing with vectors, in algebra or calculus, the cross product surely will be there.

We will discuss how to write cross-product symbols in LaTeX. A cross-product symbol is sometimes referred to as a vector product in LaTeX.

LaTeX Cross Product Command

The cross product of two vectors is operation between denoted by an X, which results in a third orthogonal vector to the other two. Both vectors must have the same size usually in a 3-D space. 

Denoted as x, a multiplication symbol, the command for the cross product is \times, it does not require extra packages or arguments, the use of the amsmath package to improve the output is optional, and the math mode is required. For example

\documentclass{article}
\usepackage{amsmath}
\begin{document}

$$\vec{a}\times\vec{b}$$ %times

\end{document}

With the /vec{} command, you can specify one single character and it will be returned with an arrow mark on top of it.

We need to use the /vec{} command in the equation before the variable or value in curly brackets to represent the variable or integer value in the vector. To transform the values “x” and “b” to vectors, we’ve inserted the /vec{} command before and after the “times” instruction.

cross product symbol in Latex
Vector product LaTeX output, \times is the cross symbol

Cross Product – Unit Vector

The first form of the cross product is with a unit vector, to generate the vector output, you use the \vec{} command. For example

\begin{document}

$$\vec{a}\times\vec{b} =|a||b|\sin \theta\hat{n}$$ %times character
\end{document}

A single character is passed as argument to the /vec{a} command and is returned with an arrow mark.

cross product symbol in Latex
Single cross character in the middle of the two symbols for vectors

The angle between the a and b is denoted by (theta), the unit vector perpendicular to a, b by \hat{}.

When you are writing the vector product in LaTeX, depending on the mathematics involved you have two options.

Cross Product – Matrix Form

Basically the Cross Product has two forms related to its Matrix form therefore it has two LaTeX commands available. To define it with matrices you will need the latex commands for the \pmatrix and \vmatrix environment and the amsmath package.

The first form with \vmatrix environment is usually used with determinants. For example you can write

...
$$
\begin{vmatrix} %matrix used for determinants
    \hat{i} & \hat{j} & \hat{k} \\
    a_1 & a_2 & a_3 \\
    b_1 & b_2 & b_3
\end{vmatrix}
$$
...

Gives the output

cross product symbol in Latex

The & defines each column and \\ represent each row or line for any element. Now you can defined the cross product as

$$
\vec{a} \times \vec{b} =
\begin{vmatrix}
    i & j & k \\
    a_1 & a_2 & a_3 \\
    b_1 & b_2 & b_3
\end{vmatrix} =
(a_{2}b_{3}-a_{3}b_{2})i +
(a_{3}b_{}1-a_{1}b_{3})j+
(a_{1}b_{2}-a_{2}b_{1})k
$$

Gives the output

cross product symbol in Latex
This is the most common representation of cross product of two vectors

Cross product – Parenthesis form

The second form is a matrix with parenthesis defined by the \pmatrix environment. For example

\begin{center}

Given$\vec{a}=\begin{pmatrix} a_{1}\\ a_{2}\\ a_{3} \end{pmatrix}$ and $\vec{b}=\begin{pmatrix} b_{1}\\ b_{2}\\ b_{3} \end{pmatrix}$.
    $\vec{a} \times \vec{b}$ is defined as:
    $\vec{a} \times \vec{b} =
    (a_{2}b_{3}-a_{3}b_{2})i +
    (a_{3}b_{}1-a_{1}b_{3})j +
    (a_{1}b_{2}-a_{2}b_{1})k$

\end{center}
cross product symbol in Latex

parenthesis matrix form

The \\  commands define each line of the elements in the parenthesis matrix form.

Since it is built-in in LaTeX, don’t try to complicate the code with packages for this symbol.

Now you know its definition, how to represent this multiplication symbol, how to work with cross products and the two forms it has to insert in your LaTeX code. 

I hope this post was helpful in guiding you using the wonderful tool that LaTeX is, and as always, keep writing in LaTeX.


Further Reading

LaTex Tutorial on Symbols

  1. How to create a hat symbol in LaTeX?
  2. How to create a prime symbol in LaTeX?
  3. How to create an absolute value symbol in LaTeX?
  4. How to create an approximate symbol in LaTeX?
  5. How to create an intersection symbol in LaTeX?
  6. How to create the empty set symbol in LaTeX?
  7. How to write a degree symbol in LaTeX?
  8. How to write a dot product in LaTeX?
  9. How to Write a Greater Than Symbol in LaTeX?
  10. How to write a norm symbol in LaTeX?
  11. How to write A Plus-Minus Symbol in LaTeX
  12. How to write a proportional to symbol in LaTeX?
  13. How to write a real number symbol in LaTeX?
  14. How to write a tilde symbol in LaTeX?
  15. How to write a union symbol in LaTeX?
  16. How to write a vector in LaTeX?
  17. How to write an infinity symbol in LaTeX?
  18. How to write bold text in LaTeX?
  19. How To Write Dots Symbols In LaTeX?
  20. How to write the arrow symbols in LaTeX
  21. How to write the Degree celsius symbol in LaTeX?
  22. How to write the equal or not equal symbol in LaTeX?
  23. How to write the Euro symbol in LaTeX?
  24. How to write the floor symbol in LaTeX?
  25. How to write the gradient operator symbol in LaTeX
  26. How To Write The Greater Than Or Equal To Symbol In LaTeX?
  27. How to write the integer number symbol in LaTeX?
  28. How to write the less than symbol in LaTeX?
  29. How to write the Natural numbers symbol in LaTeX?
  30. How to write the parallel symbol in LaTeX?
  31. How to write the percent symbol in LaTeX?
  32. How to write the square root symbol in LaTeX?
  33. How To Write The Symbol For A Subset In LaTeX?
  34. How to write the symbol for therefore in LaTeX?
  35. How to write with the mathbb in LaTeX?

Photo of author
Author
SJ Tsai
Chief Editor. Writer wrangler. Research guru. Three years at scijournal. Hails from a family with five PhDs. When not shaping content, creates art. Peek at the collection on Etsy. For thoughts and updates, hit up Twitter.

Leave a Comment