Math & ScienceHow to create matrices with column and row numbers

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

How to create matrices with column and row numbers

Post by thedreamshaper »

How do i create a matrix in Latex where i also(to the sides and above) indicate the column and row numbers ?
Last edited by thedreamshaper on Thu Sep 23, 2010 5:49 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to create matrices with column and row numbers

Post by localghost »

Search the »Math mode« document or the forum for the \bordermatrix command.


Best regards
Thorsten
albart
Posts: 13
Joined: Mon Jul 06, 2009 12:54 pm

How to create matrices with column and row numbers

Post by albart »

Hello,

with regard to your question, I was quite happy after discovering the package kbordermatrix, http://www.hss.caltech.edu/~kcb/TeX/kbordermatrix.pdf.

Albart
thedreamshaper
Posts: 44
Joined: Wed Aug 04, 2010 7:00 pm

How to create matrices with column and row numbers

Post by thedreamshaper »

Thanks goes especially to Albert :) thought meaby one of you could tell me where my mistake is :)

Code: Select all

\begin{displaymath}
\kbordermatrix{\mbox{indices}&x_{1}&x_{2}&x_{3}&x_{4}\\
y_{1}&A&B&M_{1,3}&C}\\
y_{2}&D&E&F&G\\
y_{3}&H&I&J&K
}
\end{displaymath}
error: 'kbordermatrix.sty' not found

i have included the package in my document as:

Code: Select all

\usepackage{kbordermatrix}
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

How to create matrices with column and row numbers

Post by gmedina »

As the error message indicates, the file kbordermatrix.sty is not installed in your system.

The quicker (and dirtier solution): download the file and copy it into the same directory that contains your .tex file.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply