LyXInsert (n×n) Matrices directly

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
zukimaten
Posts: 2
Joined: Sun Sep 11, 2011 3:11 pm

Insert (n×n) Matrices directly

Post by zukimaten »

Hi you guys!

I wonder if there is a straight way of inserting nxn-size matrices in math mode without using the menu or adding lines and row one at the time.

That is i wan't to be able to write \bmatrix (something) where this something is me specifying the number of rows and columns directly.

I hope some of you are able to help.

Thank you,

Henrik

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

Stefan Kottwitz
Site Admin
Posts: 10324
Joined: Mon Mar 10, 2008 9:44 pm

Insert (n×n) Matrices directly

Post by Stefan Kottwitz »

Hi Henrik,

welcome to the board!

You could simply write LaTeX code in ERT, no need to specify columns or rows:

Code: Select all

\begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}
Stefan
LaTeX.org admin
zukimaten
Posts: 2
Joined: Sun Sep 11, 2011 3:11 pm

Re: Insert (n×n) Matrices directly

Post by zukimaten »

Wow thanks for the fast response!

I haven't used ERT before, how is the most convenient way of inserting it?

I understand why learing ERT is smart, but if there is a "LyX" way of doing it i would like to know that aswell.

best regards,
Henrik
Post Reply