TransWikia.com

How to make matrix elements which spans multiple columns/rows?

TeX - LaTeX Asked by Aakash Gupta on April 9, 2021

I have a matrix which I would like to typeset. From the linked image, it can be seen that the bottom elements span 2 columns (and 2 rows but that’s not as important), how do I typset it?

Right now I am trying this

begin{gather}
    begin{bmatrix}
        0 & 0 & 1 & 0
        0 & 0 & 0 & 1
        A^{-1} C & & -A^{-1} B
    end{bmatrix}
end{gather}

but it doesn’t seem to work, as expected.

One Answer

Just use a multicolumn.

documentclass{article}
usepackage{amsmath}
begin{document}
    begin{gather}
    begin{bmatrix}
    0 & 0 & 1 & 0
    0 & 0 & 0 & 1
    multicolumn{2}{c}{A^{-1} C} & multicolumn{2}{c}{-A^{-1} B}
    end{bmatrix}
    end{gather}
end{document}

enter image description here

Correct answer by Héliton Martins on April 9, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP