Math & ScienceRegarding Equation/matrix size

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
xerion
Posts: 7
Joined: Wed Oct 20, 2010 8:29 am

Regarding Equation/matrix size

Post by xerion »

I was wondering if there is a specific limit of size that the actual equation can allocate or a limitation on matrix size. I have a couple of matrices that are longer that 10 elements and the last 1-2 elements in every row are moved to a new line, which i dont like. Its only couple more elements so i dont mind it if its gonna move more to the left and there is definitely space to fit it. I think that this is a limit in the bmatrx environment as i can add more maths before the equation

The matrix below will change lines in the 10th element, however i am able to add more terms before the bmatrix. How can i change this so the whole elements are in the same line ?

Code: Select all

\begin{equation}
  \begin{bmatrix}
    X & Y & Z & 1 & 0 & 0 & 0 & 0 & A_1 & A_2 & A_3 \\
    0 & 0 & 0 & 0 & X & Y & Z & 1 & A_1 & A_2 & A_3
  \end{bmatrix}
\end{equation}

Thank you in advance and Merry Christmas to everyone,
Christos

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Regarding Equation/matrix size

Post by frabjous »

By default you're limited to 10 columns, but you can change that by editing the MaxMatrixCols counter, e.g.:

Code: Select all

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\setcounter{MaxMatrixCols}{12}
\begin{equation}
  \begin{bmatrix}
    X & Y & Z & 1 & 0 & 0 & 0 & 0 & A_1 & A_2 & A_3 \\
    0 & 0 & 0 & 0 & X & Y & Z & 1 & A_1 & A_2 & A_3
  \end{bmatrix}
\end{equation}
\end{document}
xerion
Posts: 7
Joined: Wed Oct 20, 2010 8:29 am

Re: Regarding Equation/matrix size

Post by xerion »

Thank you for your help, much appreciated !
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Regarding Equation/matrix size

Post by localghost »

Now that the problem is solved, please be so kind and mark the topic accordingly as clearly written in Section 3 of the Board Rules (to be read before posting). Please keep that in mind for the future so that further reminders will not be necessary.


Thorsten
Post Reply