Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I want to achieve something like following:

Transition Matrix

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

share|improve this question
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 at 3:51
add comment

2 Answers

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?

share|improve this answer
add comment

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}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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