0

I don't know how to put a table and a matrix side by side. If you have to know the data on the table is just the entries of the matrix that I want to put at the right side of the table.

  • Multiple possibilities are available here since we don't have much info about the elements. A simple option: In the preamble \usepackage{amsmath} and in your document: \[ \begin{array}{cc} \hline \text{header 1} & \text{header 2} \\ \hline 1 & 2 \\ 3 & 4 \\ \hline \end{array}\qquad \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ \end{bmatrix} \] – Gonzalo Medina Oct 14 '15 at 16:25
  • 1
    Enclose it in two successive minipages. – Zarko Oct 14 '15 at 16:26
1

A tabular and array have their vertical anchor centered. So you can place them next to one another just like you do regular characters/symbols:

enter image description here

\documentclass{article}
\usepackage{booktabs}

\begin{document}

\begin{center}
  \begin{tabular}{*{4}{c}}
    \toprule
    A & B & C & D \\
    \midrule
    1 & 2 & 3 & 4 \\
    5 & 6 & 7 & 8 \\
    9 & 10 & 11 & 12 \\
    13 & 14 & 15 & 16 \\
    \bottomrule
  \end{tabular}
  \qquad
  $\left[\begin{array}{*{4}{c}}
    A & B & C & D \\
    1 & 2 & 3 & 4 \\
    5 & 6 & 7 & 8 \\
    9 & 10 & 11 & 12 \\
    13 & 14 & 15 & 16
  \end{array}\right]
  $
\end{center}

\end{document}

Of course, other alignments are also possible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.