Latex Vector Notation: Writing Vectors in Bold and Using Arrows - Tips & Tricks

In summary, to write vectors bold within displaymath and frac, you can use the \boldsymbol or \vect commands. To use arrows instead of bold notation, define a \vect command that formats vectors with arrows. It is not recommended to use \textbf in math mode as it can cause other formatting issues.
  • #1
IlyaZ
16
0

Homework Statement


a. How do I write vectors bold within displaymath and frac. I want Phi, r and r_1 bold. But get G M_1 bold as well = bad.
b. How do I use arrows instead of the bold notation?

The Attempt at a Solution


\begin{displaymath}
a1. textbf{\Phi(r)} = -\frac{G M_1}{| textbf{r}-textbf{r_1} |}
\end{displaymath}
a2. \bf{\Phi}(\bf{r}) = -\frac{G M_1}{| \bf{r}-\bf{r_1} |}
 
Physics news on Phys.org
  • #2
Arrows: \vec : [tex]\vec \Phi ( \vec r) = -\frac{G M_1}{| \vec{r}-\vec r_1 |} [/tex]
Bold: \mathbf : [tex]\mathbf{\Phi}( \mathbf{r}) = -\frac{G M_1}{| \mathbf{r}-\mathbf{r_1} |} [/tex]

I don't think you really want the potential to be a vector, but that's what your code implied, so I kept it.
 
Last edited:
  • #3
IlyaZ said:
a. How do I write vectors bold within displaymath and frac. I want Phi, r and r_1 bold. But get G M_1 bold as well = bad.

You get other bad stuff as well using \textbf. Don't use it in math mode.

\textbf{\Phi(r)} = -\frac{G M_1}{| \textbf{r}-\textbf{r_1} |}
[tex]\textbf{\Phi(r)} = -\frac{G M_1}{| \textbf{r}-\textbf{r_1} |}[/tex]

\bf doesn't work at all:
\bf{\Phi}(\bf{r}) = -\frac{G M_1}{| \bf{r}-\bf{r_1} |}
[tex]\bf{\Phi}(\bf{r}) = -\frac{G M_1}{| \bf{r}-\bf{r_1} |}[/tex]

Timo suggested \mathbf, but that doesn't work on some things.
If you have access to the AMSLaTeX macros, (and you should), use \boldsymbol.

\boldsymbol{\Phi}(\boldsymbol{r}) = -\frac{G M_1}{| \boldsymbol{r}-\boldsymbol{r}_1 |}
[tex]\boldsymbol{\Phi}(\boldsymbol{r}) = -\frac{G M_1}{| \boldsymbol{r}-\boldsymbol{r}_1 |}[/tex]

b. How do I use arrows instead of the bold notation?

Use \vec.

An even better solution is to define your own vector macro that formats vectors the way you want them to appear. For example,
\newcommand{\vect}[1]{\boldsymbol{#1}}

Then when someone tells you to format your vectors with arrows instead you can simply change that one macro.
\newcommand{\vect}[1]{\vec{#1}}
Bold symbols are used for things other than vectors (matrices, for example). A global search-and-replace is not a good idea.
 
  • #4
Last edited by a moderator:

What is Latex Vector Notation?

Latex Vector Notation is a mathematical notation system used to represent vectors in a clear, concise, and consistent way. It involves writing vectors in bold and using arrows to indicate their direction and magnitude.

Why is Latex Vector Notation important for scientists?

Latex Vector Notation is important for scientists because it allows for accurate and standardized representation of vectors, which are essential in many scientific fields such as physics, engineering, and mathematics. It also makes it easier to perform calculations and communicate ideas involving vectors.

How do I write vectors in bold using Latex?

To write a vector in bold using Latex, you can use the "\boldsymbol" command before the vector symbol. For example, "\boldsymbol{v}" will produce a bold "v" symbol, representing a vector. Alternatively, you can use the "\mathbf" command before the vector symbol, which will also produce a bold vector symbol.

How do I add arrows to my vectors using Latex?

To add arrows to your vectors using Latex, you can use the "\vec" command before the vector symbol. For example, "\vec{v}" will produce a vector symbol with an arrow on top, indicating its direction. Alternatively, you can use the "\overrightarrow" command, which will also add an arrow on top of the vector symbol.

Are there any other tips or tricks for using Latex Vector Notation?

Yes, there are a few more tips and tricks for using Latex Vector Notation. One is to use the "\hat" command before the vector symbol to represent unit vectors. Another is to use the "\cdot" command to indicate the dot product between two vectors. Additionally, you can use the "\times" command to represent the cross product between two vectors. It is also important to properly align your vectors using the "&" symbol in Latex to ensure they are correctly displayed in equations.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
14K
Replies
1
Views
844
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
265
  • Introductory Physics Homework Help
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
16
Views
3K
  • Calculus and Beyond Homework Help
Replies
4
Views
2K
  • Other Physics Topics
Replies
2
Views
2K
  • Atomic and Condensed Matter
Replies
5
Views
2K
Back
Top