Math & ScienceHow to code this relation formula?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
smoking
Posts: 1
Joined: Sat Apr 03, 2010 7:14 am

How to code this relation formula?

Post by smoking »

See the pic attached, please.
Attachments
1.png
1.png (4.26 KiB) Viewed 1839 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

How to code this relation formula?

Post by frabjous »

You have a fair number of choices. Here's one option using the array environment from amsmath:

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}
You might want to consult the mathmode document for simple tasks like this.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to code this relation formula?

Post by localghost »

Another solution with the amsmath package.

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}
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
Post Reply