[Tex/LaTex] Vector Formulas Representation in Latex

vector

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.

Best 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.