TransWikia.com

how to generate this matrix in latex?

TeX - LaTeX Asked by user224189 on October 30, 2020

documentclass{article}
usepackage{amsmath}
makeatletter
renewcommand*env@matrix[1][*c@MaxMatrixCols c]{%
  hskip -arraycolsep
  let@ifnextcharnew@ifnextchar
  array{#1}}
makeatother
begin{document}
begin{equation}
  begin{bmatrix}[cc|c|c]
0 & -I & I & 0
0 & 0 & -I & I 
end{bmatrix}
end{equation}
end{document}

enter image description here

One Answer

You can't get those matrices just with bmatrix, but you need to use the lower level array:

documentclass{article}
usepackage{amsmath,booktabs}

begin{document}

[
mathbf{L}=
begin{bmatrix}
begin{array}{@{}cc@{}}
mathbf{I} & mathbf{0} 
mathbf{0} & mathbf{I} 
midrule[arrayrulewidth]
mathbf{0} & mathbf{I} 
midrule[arrayrulewidth]
mathbf{0} & mathbf{I}
end{array}
end{bmatrix}
implies
mathbf{L}^+=
begin{bmatrix}
begin{array}{@{}cc|c|c@{}}
mathbf{I} & mathbf{0} & mathbf{0} & mathbf{0} 
mathbf{0} & mathbf{I} & mathbf{0} & mathbf{0}
end{array}
end{bmatrix}
]

end{document}

enter image description here

Answered by egreg on October 30, 2020

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