TransWikia.com

How to place a vertical dashed line between columns of a matrix?

TeX - LaTeX Asked by Sevdije on July 21, 2021

Can you help me how to do that dashed line on this matrix ?

Can you help me how to do that dashed line on this matrix

2 Answers

I will add another simple solution if you like.

enter image description here

documentclass{article}
usepackage{arydshln}
usepackage{mathtools}
begin{document}
[ left[
begin{array}{c:c}
1 &  2  
3 & 4 
5 & 6  
end{array} right] ]
end{document}

ADDENDUM: 2020-7-24. Using {bNiceArray} of nicematrix package you will have the square brackets at the same position as in {bmatrix} of amsmath.

documentclass[a4paper,12pt]{article}

usepackage{nicematrix}
usepackage{arydshln}

NiceMatrixOptions{letter-for-dotted-lines=V}

begin{document}
$begin{bNiceArray}{c:c}
1 & 2 
3 & 4 
5 & 6
end{bNiceArray}$
end{document}

Remark: If you don't put NiceMatrixOptions{letter-for-dotted-lines=V}, you will have a dotted line (drawn by nicematrix).

Result of the second code

Correct answer by Sebastiano on July 21, 2021

Try

documentclass{article}
usepackage{amsmath}
usepackage{arydshln}
begin{document}
begin{equation}
left[
    begin{array}{c;{2pt/2pt}c}
        -2 & -4 
         2 & -1 
        -8 & 16
    end{array}
right]
end{equation}
end{document}

To obtain

enter image description here

Answered by Denis on July 21, 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