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 am having trouble writing procedure for Gauss-Jordan transformation matrix in LaTeX.

I want to write something like

      r2 - r1         r3-2r1
[A|I] -------> [A'|I'] ----->

and so on with the corresponding transformations (e.g., r2-r1) on top of the arrows. Could you give me an example code of how to do this? I only know that I need \bmatrix for matrices with [], but I do not know how to split them in between with a vertical line |.

Thanks a lot!

share|improve this question
    
You might find the answers at this question useful as well: tex.stackexchange.com/q/2233/86 –  Loop Space Jun 7 '11 at 7:01
add comment

1 Answer 1

With amsmath you can use

\xrightarrow{r_{2}-r_{1}}

that will produce an arrow wide enough to accommodate the thing on top.

In order to split matrices you need to use array

\left[\begin{array}{@{}cc|c@{}}
   <entries>
\end{array}\right]

With the @{} at both sides you'll get output similar to that of bmatrix.

share|improve this answer
    
Thanks I got it now! –  Erik Jun 6 '11 at 23:33
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.