4

I need to typeset the following:

enter image description here

But I cannot seem to get the dotted line or the centered r_{i, j}. Can anyone show a minimal working example?

6

Another approach, a little bit simpler

enter image description here

\documentclass{article}
\usepackage{amsmath}
\usepackage{arydshln}

\begin{document}

\[
R_{a,b}(\theta)=\left[\quad r_{i,j}\left.
\begin{array}{r;{2pt/2pt}l}
    &   r_{a,a}=\cos(\theta) \\
    &   r_{b,b}=\cos(\theta) \\
    &   r_{a,b}=-\sin(\theta) \\
    &   r_{b,a}=\sin(\theta) \\
    &   r_{j,j}=1,\quad j\ne a,\quad j\ne b \\
    &   r_{i,j}=0,\quad \mathrm{elsewhere} \\
\end{array}
\,\right.\right]
\]

\end{document}
5

For the dotted line, you can use the arydshln package and set the dash length and spacing to appropriate values:

\usepackage{arydshln}    
\setlength{\dashlinedash}{0.5pt}
\setlength{\dashlinegap}{1pt}

For the centered r_{i,j}, you can nest a vertical array inside a horizontal array.

narray

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{arydshln}

\setlength{\dashlinedash}{0.5pt}
\setlength{\dashlinegap}{1pt}
\begin{document}
    \begin{equation*}
    R_{a,b}(\theta)=\left[\begin{array}{l:l}
    r_{i,j} & \begin{array}{l}
    r_{a,a}=\cos(\theta) \\
    r_{b,b}=\cos(\theta) \\
    r_{a,b}=-\sin(\theta) \\
    r_{b,a}=\sin(\theta) \\
    r_{j,j}=1,\quad j\ne a,\quad j\ne b \\
    r_{i,j}=0,\quad \mathrm{elsewhere} \\
    \end{array}
    \end{array}\right] \\
    \end{equation*}
\end{document}
2

A solution with pstricks for the dotted vertical line, and an alignedat environment inside a bmatrix, which allows for the alignment of the = signs:

\documentclass{article}

\usepackage{mathtools}
\usepackage{pst-node}
\usepackage{auto-pst-pdf} %% to compile with pdflatex

\begin{document}

\begin{equation*}
  \begin{pspicture}
    R_{a,b}(θ)=\begin{bmatrix}
      r_{i,j} & \begin{alignedat}{2}
        & \pnode[-1.3ex, 1ex]{B} & r_{a,a} & =\cos(θ) \\
        & & r_{b,b} & =\cos(θ) \\
        & & r_{a,b} & =-\sin(θ) \\
        & & r_{b,a} & =\sin(θ) \\
        & & r_{j,j} & =1,\quad j\ne a,\quad j\ne b \\
        & \pnode[-1.3ex, -0.25ex]{E} & r_{i,j} & =0,\quad \mathrm{elsewhere} \\
      \end{alignedat}
    \end{bmatrix}
    \ncline[linestyle = dotted, dotsep = 1.5pt]{B}{E}
  \end{pspicture}
\end{equation*}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.