Some basic vector diagrams, to illustrate vector components, unit vectors, angles, scalar product, etc.
Also see other figures under the “vectors” tag: vector sum rule, right-hand rule, or the divergence and curl of vector fields.
Edit and compile if you like:
% Author: Izaak Neutelings (September 2020)\documentclass[border=3pt,tikz]{standalone}\usepackage{amsmath}\usepackage{tikz}\usepackage{physics}\usepackage[outline]{contour} % glow around text\usetikzlibrary{angles,quotes} % for pic\contourlength{1.2pt}\tikzset{>=latex} % for LaTeX arrow head\usepackage{xcolor}\colorlet{veccol}{green!70!black}\colorlet{vcol}{green!70!black}\colorlet{xcol}{blue!85!black}\colorlet{projcol}{xcol!60}\colorlet{unitcol}{xcol!60!black!85}\colorlet{myblue}{blue!70!black}\colorlet{myred}{red!90!black}\colorlet{mypurple}{blue!50!red!80!black!80}\tikzstyle{vector}=[->,very thick,xcol]\begin{document}% VECTOR breakdown on axis\begin{tikzpicture}\def\ul{0.52}\def\R{2.6}\def\ang{28}\coordinate (O) at (0,0);\coordinate (R) at (\ang:\R);\coordinate (X) at ({\R*cos(\ang)},0);\coordinate (Y) at (0,{\R*sin(\ang)});\node[fill=black,circle,inner sep=0.9] (R') at (R) {};\node[above right=-2] at (R') {$(x,y)$};\draw[<->,line width=0.9] %very thick({1.2*\R*cos(\ang)},0) -- (O) -- (0,{1.3*\R*sin(\ang)});\draw[projcol,dashed] (X) -- (R);\draw[projcol,dashed] (Y) -- (R);\draw[vector] (O) -- (R') node[midway,left=5,above right=0] {$\vb{r}$};
Click to download: vectors.tex • vectors.pdf
Open in Overleaf: vectors.tex