I want to write different formulas related vectors like subtraction, addition in latex, but don't know how to do this as I am new to Latex. I searched a lot but did not find any useful result.
-
2You need to be much more specific - what exactly is it that you want to do but can't figure out?– Nick PetersonJun 13, 2013 at 0:42
-
I want to show formula for vector addition and subtraction in my report for that I need vector arrow on each variable.– Najam-us-SaqibJun 13, 2013 at 0:50
1 Answer
You can decorate a variable, say x, with a vector arrow using \vec{x}
in math mode.
For a slightly more flexible definition (if you want, say, to have a vector whose name is more than one letter), you can put the following in the preamble of your document:
\renewcommand{\vec}[1]{\ensuremath{\overrightarrow{#1}}}
Then you can use, say, \vec{AB}
, and the arrow will stretch to cover both.