fraction of matrix

If we need an equation with matrix and fraction, the most evident code is

 L(z)=
\frac{\bordermatrix{& & & i & & \cr
& 0 & \dots & 1 & \dots & 0 \cr
& 0 & \dots & 1 & \dots & 0 \cr
& \vdots & \vdots & \vdots & \vdots & \vdots \cr
i & 0 & \dots & 0 & \dots & 0 \cr
& \vdots & \vdots & \vdots & \vdots & \vdots \cr
& 0 & \dots & 1 & \dots & 0 \cr}}{z+a}+
\bordermatrix{
& & & i & & \cr
& L^{11}_{i0} & \dots & L^{1i}_{i0} & \dots & L^{1r}_{i0} \cr
& L^{21}_{i0} & \dots & L^{2i}_{i0} & \dots & L^{2r}_{i0} \cr
& \vdots & \vdots & \vdots & \vdots & \vdots \cr
i & 0 & \dots & 1 & \dots & 0 \cr
& \vdots & \vdots & \vdots & \vdots & \vdots \cr
& L^{r1}_{i0} & \dots & L^{ri}_{i0} & \dots & L^{rr}_{i0} \cr}+f(z)


But it doesn't look nice, because the first matrix is more higher than the second one. Can I change such situation? Thanks!

My proposal:

• You can use \frac{1}{z+a}. Actually it makes the equation much more readable.
• Don't write i on the side of the matrices. These is will mess up your equations – they should be used only when the "equation" contains only one single matrix and nothing else. The best way in my opinion is to tell your readers that each matrix has i rows and i columns in advance.

Code:

\documentclass{article}
\usepackage{mathtools}
\begin{document}
$L(z)=\frac{1}{z+a}\times \begin{pmatrix} 0 & \dots & 1 & \dots & 0 \cr 0 & \dots & 1 & \dots & 0 \cr \vdots & \vdots & \vdots & \vdots & \vdots \cr 0 & \dots & 0 & \dots & 0 \cr \vdots & \vdots & \vdots & \vdots & \vdots \cr 0 & \dots & 1 & \dots & 0 \cr \end{pmatrix}+ \begin{pmatrix} L^{11}_{i0} & \dots & L^{1i}_{i0} & \dots & L^{1r}_{i0} \cr L^{21}_{i0} & \dots & L^{2i}_{i0} & \dots & L^{2r}_{i0} \cr \vdots & \vdots & \vdots & \vdots & \vdots \cr 0 & \dots & 1 & \dots & 0 \cr \vdots & \vdots & \vdots & \vdots & \vdots \cr L^{r1}_{i0} & \dots & L^{ri}_{i0} & \dots & L^{rr}_{i0} \cr \end{pmatrix}+f(z)$
\end{document}


How about this layout instead? I used smaller row and column indices to avoid any ambiguity,and imrpoved the spacing between the first and second rows of last matrix.

\documentclass{article}
\usepackage{kbordermatrix} %
\usepackage{relsize}

\begin{document}

$L(z)= \frac{1}{z+a}{ \setlength{\kbrowsep}{4ex}\bordermatrix{& & &\scriptstyle i & & \cr & 0 & \dots & 1 & \dots & 0 \cr & 0 & \dots & 1 & \dots & 0 \cr & \vdots & \vdots & \vdots & \vdots & \vdots \cr \mathsmaller{i}\! & 0 & \dots & 0 & \dots & 0 \cr & \vdots & \vdots & \vdots & \vdots & \vdots \cr & 0 & \dots & 1 & \dots & 0 \cr}}+ \bordermatrix{ & & & \mathsmaller{i} & & \cr &L^{11}_{i0} & \dots & L^{1i}_{i0} & \dots & L^{1r}_{i0} \cr & \rule{0pt}{2.7ex} L^{21}_{i0} & \dots & L^{2i}_{i0} & \dots & L^{2r}_{i0} \cr & \vdots & \vdots & \vdots & \vdots & \vdots \cr \mathsmaller{i}\! & 0 & \dots & 1 & \dots & 0 \cr & \vdots & \vdots & \vdots & \vdots & \vdots \cr & L^{r1}_{i0} & \dots & L^{ri}_{i0} & \dots & L^{rr}_{i0} \cr}+f(z)$

\end{document}