6

I need to create this construction.

enter image description here

And I wrote this code

    \begin{equation*}
      b_{12}^{(2)} =  
       \begin{array}{ccccccc}
        1 & a & b & c & d &  & \\
        a & 1 & \overline{e} & 0 & \overline{f} & & \\
        \cline{1-5}
        \vspace{-2ex} &&&&&& \\
        a+ & a+ & b\overline{e}+ & 0+ & d\overline{f} & = &
        \end{array}
    \end{equation*}

enter image description here

This is not nice. Please help. Thanks

  • What is "not nice" about it? Is there some logic behind the "matrix addition"? – Werner Oct 24 '15 at 21:22
6

Some hand formatting:

\documentclass{article}
\usepackage{amsmath}
\usepackage{array,booktabs}

\newcommand{\splitcell}[2]{%
  \begin{array}{@{}c@{}}
  #1\\#2
  \end{array}%
}

\begin{document}

\[
\setlength{\arraycolsep}{0pt}
\begin{array}{ r<{{}} *{9}{>{{}}c<{{}}} }
b_{12}^{(2)} = &
  \splitcell{1}{a} &&
  \splitcell{a}{1} &&
  \splitcell{b}{\bar{e}} &&
  \splitcell{c}{0} &&
  \splitcell{d}{\bar{f}} \\
\cmidrule{2-10}
& a & + & a & + & b\bar{e} & + & 0 & + & d\bar{f}
\end{array}
\]

\end{document}

enter image description here

1

I don't have access to an environment to test it at the moment, but this should work, I think: you can use the amsmath package's \genfrac command to stack two expressions with a line between them.

\genfrac{}{}{}{}{%
 \begin{matrix}
  1 & a & b & c & d\\
  a & 1 & \bar{e} & 0 & \bar{f}
 \end{matrix}%
}{a + a + b\bar{e} + 0 + d\bar{f}}

This will automatically produce the proper spacing.

  • This is work, but in down string is small font – Ilia Ilin Oct 25 '15 at 7:55

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.