3

I want to achieve something like following:

Transition Matrix

Is there a way to achieve this in latex? Thanks for your help.

1
  • 1
    Please post a Minimal Working (or Non-Working) Example. If you show people what you've tried and explain the problem you've run into, it will be a lot easier for people to help. A MWE is a small document which people can compile to reproduce the issue you're having or, if applicable, can try to compile to reproduce the errors you're getting. Providing this will help ensure you get useful responses.
    – cfr
    Feb 4 '14 at 3:51
3

Given what you provide, blkarray can do this job:

enter image description here

\documentclass{article}
\usepackage{blkarray}% http://ctan.org/pkg/blkarray
\newcommand{\idxsize}{\scriptstyle}
\begin{document}
\[
  \begin{blockarray}{crcc}
    & & \rlap{\phantom{0}\hspace{.5\arraycolsep}$\idxsize j$}  &  \\
    & & \idxsize 0 & \idxsize 1 \\
    \begin{block}{cr[cc]}
      \relax\raisebox{-.5\normalbaselineskip}[0pt][0pt]{$\idxsize j-1$} & \idxsize 0 & a & b \\
      & \idxsize 1 & c & d \\
    \end{block}
  \end{blockarray}
\]
\end{document}

More matrix-style constructions is available in Where is the \matrix command?

1

A second alternative via tikz-cd

enter image description here

Code

\documentclass[margin=10pt,varwidth]{standalone}

\usepackage{amssymb,amsmath}
\usepackage{tikz-cd}
\begin{document}

\begin{tikzcd}[row sep=tiny,column sep=tiny]
     &     &    &                    &   & j &    &\\
     &     &    &                    & 0 &   & 1  &\\
     &     &    & \arrow[draw=none]{}&   &   &    &\arrow[draw=none]{}\\
     &     & 0  &                    & a &   & b  &\\
j-1  &     &    &                    &   &   &    &\\
     &     & 1  &                    & c &   & d  &\\
     &     &    & \arrow[dash]{uuuu} &   &   &    &\arrow[dash]{uuuu}\\
\end{tikzcd}

\end{document}

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.