mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
26 lines
927 B
TeX
26 lines
927 B
TeX
\documentclass[varwidth=true, border=2pt]{standalone}
|
|
\usepackage{tikz}
|
|
\usetikzlibrary{shapes, calc, shapes, arrows}
|
|
\usepackage{amsmath,amssymb}
|
|
|
|
\usepackage{xcolor}
|
|
\definecolor{xvectorcolor}{HTML}{77933C}
|
|
|
|
\begin{document}
|
|
\begin{tikzpicture}[]
|
|
% Punkte
|
|
\coordinate (A) at (0,0) {};
|
|
\coordinate (B) at (5,0) {};
|
|
\coordinate (C) at (2,2) {};
|
|
|
|
% Draw the triangle
|
|
\path[fill=blue!10, fill=blue!10] (A) -- (B) -- (C) -- (A);
|
|
\draw[->, ultra thick,fill=gray!10, xvectorcolor, arrows={-latex}] (A) -- (C) node[sloped,midway,above] {$x$};
|
|
\draw[->, ultra thick,fill=gray!10, blue!80, arrows={-latex}] (C) -- (B) node[sloped,midway,above] {$y$};
|
|
\draw[->, ultra thick,fill=gray!10, red!80, arrows={-latex}] (A) -- (B) node[sloped,midway,above] {$z = x + y$};
|
|
\coordinate (A) -- (B) node[sloped,midway,below] {$\|z\| = \|x+y\| \leq \|x\| + \|y\|$};
|
|
|
|
|
|
|
|
\end{tikzpicture}
|
|
\end{document}
|