1

Just need to tex a bmatrix like this: enter image description here

Please tell me the SIMPLEST way of doing that. I only need to make one, not many of them in my presentation and it doesn't matter the size, font, etc.. just let the audience recognize it, that's OK. Thanks a lot!

I just tried this:

\[
\mb{A}=
\left[
    \begin{array}{c;{2pt/2pt}c;{2pt/2pt}c;{2pt/2pt}c}
         &   &   &  \\ 
        A_1 & A_2 & A_3 & A_4 \\
         &  &  & 
    \end{array}
\right]
\]

Then I got enter image description here

Is it right?

diabonas
  • 25,784

1 Answers1

0

Copying and editing David Carlisle's code from Vertical dashed line of a custom height yields

\documentclass{article}

\usepackage{amsmath}
\usepackage{arydshln}
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
    \hskip -\arraycolsep
    \let\@ifnextchar\new@ifnextchar
    \array{#1}}
\makeatother
\begin{document}
\begin{equation*}
\begin{bmatrix}[cccc:c]
a_{11} & a_{12} & \cdots & a_{1n} & b_1 \\
a_{21} & a_{22} & \cdots & a_{2n} & b_2 \\
\vdots & \vdots & \ddots & \vdots & \vdots \\
a_{n1} & a_{n2} & \cdots & a_{nn} & b_n
\end{bmatrix}
\end{equation*}
\end{document}

EDIT

Since OP's intended output is different from what's in his/her image, here's some code that does both.

\documentclass{article}

\usepackage{amsmath}
\usepackage{arydshln}
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
    \hskip -\arraycolsep
    \let\@ifnextchar\new@ifnextchar
    \array{#1}}
\makeatother
\begin{document}
\begin{equation*}
\begin{bmatrix}[cccc:c]
a_{11} & a_{12} & \cdots & a_{1n} & b_1 \\
a_{21} & a_{22} & \cdots & a_{2n} & b_2 \\
\vdots & \vdots & \ddots & \vdots & \vdots \\
a_{n1} & a_{n2} & \cdots & a_{nn} & b_n
\end{bmatrix}
\end{equation*}


Without the dashes shown in OP's question
\begin{equation*}
\left[
\begin{matrix} \\ v_1 \\ \\\end{matrix}
\Biggm\vert
\begin{matrix} \\ v_2 \\ \\\end{matrix}
\right] 
\end{equation*}
\end{document}
JPi
  • 13,595