How to create a labelled matrix in LaTeX?

  • LaTeX
  • Thread starter rwinston
  • Start date
  • #1
36
0

Main Question or Discussion Point

Hi

does anybody know how to create a labelled matrix in LaTeX? By which I mean something like this:
a b
a [ 1 0 ]
b [ 0 1 ]

Where the inner elements are within the braces, but there are tabular label elements for the rows and columns (a and b). Cant get it too look right!

Cheers
 

Answers and Replies

  • #2
alphysicist
Homework Helper
2,238
1
Hi rwinston,

If you don't mind parenthesis instead of braces you can use bordermatrix from plain TeX:

[tex]
\bordermatrix{&a_1&a_2& a_3 \cr
b_1 & 1 & 2 & 3 \cr
b_2 & 2 & 3 & 4 \cr
b_3 & 3 & 4 & 5 \cr}
[/tex]


[tex]
\bordermatrix{&a_1&a_2\cr
b_1 & 1 & 2 \cr
b_2 & 2 & 3 \cr}
[/tex]


[tex]
\bordermatrix{&a_1&a_2 \cr
b_1 & 1 & 2 \cr
b_2 & 2 & 3 \cr
b_3 & 3 & 4 \cr}
[/tex]

There is also a newer kbordermatrix package that you can use that gives more options (such as being able to change the delimiters).
 
  • #3
36
0
Thanks! Thats exactly what I need!
 

Related Threads for: How to create a labelled matrix in LaTeX?

Replies
11
Views
3K
Replies
5
Views
16K
  • Last Post
Replies
2
Views
2K
Replies
2
Views
3K
Replies
6
Views
5K
Replies
3
Views
789
Replies
2
Views
10K
Replies
1
Views
18K
Top