Math & Science ⇒ How to code this relation formula?
How to code this relation formula?
See the pic attached, please.
- Attachments
-
- 1.png (4.26 KiB) Viewed 1806 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

How to code this relation formula?
You have a fair number of choices. Here's one option using the array environment from amsmath:
You might want to consult the mathmode document for simple tasks like this.
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
R = \left(
\begin{array}{@{}ccccc@{}}
1 & 1 & 2 & 3 & 7 \\
3 & 1 & 4 & 4 & 0 \\
\end{array}
\right) ;
\]
\end{document}
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How to code this relation formula?
Another solution with the amsmath package.
Further enhancements are possible with the mathtools package from the mh bundle.
By the way, the array environment comes from vanilla LaTeX.
Best regards and welcome to the board
Thorsten
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\[
R=
\begin{pmatrix}
1 & 1 & 2 & 3 & 7 \\
3 & 1 & 4 & 4 & 0
\end{pmatrix};
\]
The in-line version looks like
\(
R=\bigl(
\begin{smallmatrix}
1 & 1 & 2 & 3 & 7 \\
3 & 1 & 4 & 4 & 0
\end{smallmatrix}
\bigr)
\).
\end{document}
By the way, the array environment comes from vanilla LaTeX.
Best regards and welcome to the board
Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10