# Right triangle

> A right triangle with its sides labeled and the right angle marked. A Geometry example with its complete LaTeX source, ready to copy or open in TeXeR.

A Geometry example in the TeXeR TikZ library: https://texer.org/library/geometry/right-triangle

Package: [Geometry](https://texer.org/library/geometry.md), on CTAN at https://ctan.org/pkg/pgf.

Tags: triangle, right angle, geometry

## Source

```latex
\begin{tikzpicture}[thick]
  \draw (0,0) coordinate (A) -- (4,0) coordinate (B) -- (4,3) coordinate (C) -- cycle;
  \draw (3.7,0) -- (3.7,0.3) -- (4,0.3);
  \node[below] at (2,0) {$a$};
  \node[right] at (4,1.5) {$b$};
  \node[above left] at (2,1.5) {$c$};
\end{tikzpicture}
```

## As a complete document

The same example in a document that compiles on its own with pdfLaTeX:

```latex
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}
\begin{tikzpicture}[thick]
  \draw (0,0) coordinate (A) -- (4,0) coordinate (B) -- (4,3) coordinate (C) -- cycle;
  \draw (3.7,0) -- (3.7,0.3) -- (4,0.3);
  \node[below] at (2,0) {$a$};
  \node[right] at (4,1.5) {$b$};
  \node[above left] at (2,1.5) {$c$};
\end{tikzpicture}
\end{document}
```
