Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Resources > LaTex Help
Reply
 
Thread Tools Display Modes
  #1  
Old December 6th, 2007, 01:19 AM
Gunslinger
Guest
 
Posts: n/a
Default [SOLVED] adding braces above a Matrix

Hi everyone!

I'm trying to add some braces above/below and left/right of a Matrix to describe how many Columns and Rows certain ranges of the matrix has.
For example I have a 2 by 2 Block-matrix. I want a brace over the first and the one over the second column telling me how large each blockmatrix is.
\overbrace doesn't seem to work for me because either the brace and it's description end up inside the matrix or the braces are over the brackets and the column to be braced.
Here's what I've tried sofar:

\[
\left[ {\begin{array}{*{20}c}
1 & 2 \\
3 & 4 \\
\end{array}} \right] + \overbrace {\left[ {\begin{array}{*{20}c}
1 \\
3 \\
\end{array}} \right.}^N\quad \overbrace {\left. {\begin{array}{*{20}c}
2 \\
4 \\
\end{array}} \right]}^k\begin{array}{*{20}c}
{\left. {} \right\}N}\\
{\left. {} \right\}k}\\
\end{array}
\]

I hope someone knows a solution to this problem.

Michael
Reply With Quote
Advertisement
 
  #2  
Old December 20th, 2007, 12:05 PM
Opalg's Avatar
MHF Contributor

 
Join Date: Aug 2007
Location: Leeds, UK
Posts: 2,442
Country:
Thanks: 150
Thanked 1,486 Times in 1,243 Posts
Opalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant futureOpalg has a brilliant future
Default

Plain TeX has a control sequence \bordermatrix to handle this sort of thing. Unfortunately it's a bit inflexible. It only allows parenthesised matrices, and it only allows labels above and to the left, not below or to the right of the matrix. The input

\[
\bordermatrix{&\overbrace{}^N&\overbrace{}^k\cr \llap{${\scriptstyle N}\{$}&A&B\cr \llap{${\scriptstyle k}\{$}&C&D\cr}
\]

yields

\bordermatrix{&\overbrace{}^N&\overbrace{}^k\cr \llap{${\scriptstyle N}\{$}&A&B\cr \llap{${\scriptstyle k}\{$}&C&D\cr} .

Note the use of \llap to justify the braces to the left of the matrix. Without this, the labels would be left justified, giving a ragged appearance.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 06:17 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.