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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to demonstrate the special formula for the determinants of 3 by 3 matrices, http://www.purplemath.com/modules/determs2.htm. That is

a & b & c & a & b\\ d & e & f & d & e\\ g & h & i & g & h  

adding two columns and draw diagonal lines. In the question, Draw a vertical line over the entries of a column in an array, it is answered how to draw vertical lines. The method I believe can be applied to my case. But I am wondering if there is any recent dedicated package that handles this.

share|improve this question
duplicate:tex.stackexchange.com/questions/30032/… – kba Feb 14 at 4:21
@kba: I am hereby saying that this cannot be done by the previous answers. I am in fact looking for if there has been a development of a dedicated package for this. – Youngsu Feb 14 at 5:49
@Andrew That link is already in my original post. – Youngsu Feb 14 at 5:49
up vote 5 down vote accepted

Here is a quick hack using a matrix of math nodes and tikz:

enter image description here


      \matrix (M)[matrix of math nodes,row sep=1cm,column sep=16mm]{
       a & b & c & a & b\\ d & e & f & d & e\\ g & h & i & g & h\\&&[blue]adi&[red]-bfg&[blue]cdh\\
share|improve this answer
Thank you very much. What I wanted was (M-1-1)--(M-3-3) in your code. This is very helpful. – Youngsu Feb 14 at 7:43

Your Answer


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.