Math & ScienceBlock matrix with labels

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
notnek
Posts: 11
Joined: Mon Dec 07, 2009 5:09 pm

Block matrix with labels

Post by notnek »

Code: Select all

\documentclass[12pt,a4paper]{article}

\usepackage{amssymb}
\usepackage[fleqn]{amsmath}
\usepackage{tikz}
\usepackage{amssymb}
\usetikzlibrary{matrix}

\begin{document}

\begin{equation}
\left(\begin{array}{ccccccc|ccccc}
+0&+1&\cdots &+j&\cdots & +k & \cdots &+0'&+1'&\cdots & +j' & \cdots \\
&&&&&&&&&&&\\
\cdots &\cdots &\cdots & \varepsilon_{i j} k &\cdots & \varepsilon_{i k} c_{i k} & \cdots & \cdots & \cdots & \cdots & \varepsilon'_{i j} k' & \cdots \\ 
&&&&&&&&&&&\\ \hline
\alpha_0 0' & \alpha_1 1'& \cdots & \alpha_j j'& \cdots & \alpha_k k' & \cdots & -\alpha_0 0 & -\alpha_1 1 & \cdots & -\alpha_j j & \cdots
\end{array}\right)
\nonumber \end{equation}

\end{document}
I want to edit this matrix so that there is an 'i' outside the third row (as a label to the left), an 'r+1' label outside the fifth row and 'j', 'k', 's+j' labels above the respective 4th,6th and 11th columns.

Can someone help?

Recommended reading 2024:

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

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

coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Block matrix with labels

Post by coachbennett1981 »

I think the bordermatrix feature would be great hear.. Something like

Code: Select all


\[\bordermatrix{&\text{To Orlando}&\text{To Philadelphia}&\text{To Seattle}\cr
	\text{From Orlando}&0&1&1\cr
	\text{From Philadelphia}&1&0&1\cr
	\text{From Seattle}&0&1&0}\]
notnek
Posts: 11
Joined: Mon Dec 07, 2009 5:09 pm

Block matrix with labels

Post by notnek »

coachbennett1981 wrote:I think the bordermatrix feature would be great hear.. Something like

Code: Select all


\[\bordermatrix{&\text{To Orlando}&\text{To Philadelphia}&\text{To Seattle}\cr
	\text{From Orlando}&0&1&1\cr
	\text{From Philadelphia}&1&0&1\cr
	\text{From Seattle}&0&1&0}\]
Thank you!

How would I add lines to form a block matrix?
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Block matrix with labels

Post by coachbennett1981 »

Here is an example. I am sorry I did not write your matrix into this bordermatrix. I really hope this helps..

Code: Select all

\documentclass{article}
\usepackage{kbordermatrix}
\begin{document}

\begin{equation}
\kbordermatrix{
& 1 \ldots 18 & \vrule & 19 \text{ } 20 \text{ } 21 \text{ } 22 & \vrule & 23 \text{ }  24 \text{ } 25 \text{ } 26 \\           
  \begin{array}{c} \chi(A'_1) \\ \chi(A'_2) \\ \chi(A'_3) \\ \chi(A'_4) \end{array}
& \begin{array}{c} \chi(A_1)  \\ \chi(A_2)  \\ \chi(A_3)  \\ \chi(A_4)  \end{array}
& \vrule & I & \vrule& I \\ \hline
  \begin{array}{c} \chi(B'_1) \\ \chi(B'_2) \\ \chi(B'_3) \\ \chi(B'_4) \end{array}
& \begin{array}{c} \chi(B_1)  \\ \chi(B_2)  \\ \chi(B_3)  \\ \chi(B_4)  \end{array}
& \vrule & J & \vrule& I  } , 
\end{equation}
\end{document}





You could also try this:

Code: Select all


\documentclass{article}
\usepackage{multirow,bigdelim}
\begin{document}
\[
\begin{array}{ccc|cc|ccc}
  && x & a & b & c & d \\
A &\ldelim({4}{0.5em}& x
  & \multicolumn{2}{c|}{\multirow{2}*{ab}}
  & \multicolumn{2}{c}{\multirow{2}*{cd}}
  & \rdelim){4}{0.5em} \\
B && y &&&& \\
\hline
C && x 
  & \multicolumn{2}{c|}{\multirow{2}*{ab}}
  & \multicolumn{2}{c}{\multirow{2}*{cd}} \\
D && y &&&& \\
\end{array}
\]
\end{document}


Nick
notnek
Posts: 11
Joined: Mon Dec 07, 2009 5:09 pm

Re: Block matrix with labels

Post by notnek »

I've tried really hard to use the templates given to make the matrix but I can't make the matrix look like the one I posted. I also keep getting errors.

Could someone post code which turns my matrix into a border matrix?

Thanks in advance.
Post Reply