# How can I reduce the size of matrix?

How can I reduce the size of below matrix? (i.e. this matrix is wide, i want to reduce the distance of entries.)

\documentclass{article}
\usepackage{mathtools}
\usepackage{blkarray, bigstrut} %
\begin{document}
\begin{equation*}
\mathbf{S}=
\begin{blockarray}{*{10}{c} l}
\begin{block}{*{10}{>{$\footnotesize}c<{$}} l}
Rose & Teal & Plum & Sand & Peach & & & & & &\\
\end{block}
\begin{block}{[*{10}{c}]>{$\footnotesize}l<{$}}
1&0 &\cdots & 0     & 1 & 0 &      &\cdots &      & 0 \bigstrut[t] & small \\
1&0 &\cdots & 0     &-1 & 0 &      &\cdots &      & 0              & medium \\
0&1 &0      &\cdots & 0 & 1 &0     &\cdots &      & 0              & large \\
0&1 &0      &\cdots & 0 &-1 &0     &\cdots &      & 0              & large \\
&  &       &       &   &   &      &       &      &                &        \\
&  &       &       &   &   &      &       &      &                &        \\
0&  &\cdots &       & 1 & 0 &\cdots&    0  &  1   & 0              &        \\
0&  &\cdots &       & 1 & 0 &\cdots&    0  &  -1  & 0              &        \\
0&  &\cdots &       & 0 & 1 & 0    &\cdots &  0   &1               &        \\
0&  &\cdots &       & 0 & 1 & 0    &\cdots &  0   &-1              &        \\
\end{block}
\end{blockarray}
\end{equation*}
\end{document}

• What do you want to reduce, precisely? – egreg May 19 at 15:07
• Sorry about exactness. My matric is wide, I want to reduce the distance of entries. – Ramtin Valedein asl May 19 at 15:49

Since you don't say exactly what it is that you want to be reduced and what not, I'm just guessing that you want the matrix itself to be smaller. (I haven't changed any of your other code, just added \footnotesize around the matrix.)

\documentclass{article}
\usepackage{mathtools}
\usepackage{blkarray, bigstrut} %
\begin{document}

\begin{equation*}
\mathbf{S}=
{\footnotesize
\begin{blockarray}{*{10}{c} l}
\begin{block}{*{10}{>{$\footnotesize}c<{$}} l}
Rose & Teal & Plum & Sand & Peach & & & & & &\\
\end{block}
\begin{block}{[*{10}{c}]>{$\footnotesize}l<{$}}
1&0 &\cdots & 0     & 1 & 0 &      &\cdots &      & 0 \bigstrut[t] & small \\
1&0 &\cdots & 0     &-1 & 0 &      &\cdots &      & 0              & medium \\
0&1 &0      &\cdots & 0 & 1 &0     &\cdots &      & 0              & large \\
0&1 &0      &\cdots & 0 &-1 &0     &\cdots &      & 0              & large \\
&  &       &       &   &   &      &       &      &                &        \\
&  &       &       &   &   &      &       &      &                &        \\
0&  &\cdots &       & 1 & 0 &\cdots&    0  &  1   & 0              &        \\
0&  &\cdots &       & 1 & 0 &\cdots&    0  &  -1  & 0              &        \\
0&  &\cdots &       & 0 & 1 & 0    &\cdots &  0   &1               &        \\
0&  &\cdots &       & 0 & 1 & 0    &\cdots &  0   &-1              &        \\
\end{block}
\end{blockarray}
}
\end{equation*}

\end{document}

• Sorry,about exactness. My matrix is very wide ,i want to reduce distance of entry. – Ramtin Valedein asl May 19 at 15:38

Same as others, I'm not sure what you really want to reduce, but my idea is you may be able to divide the big matrix into four small matrices. Along the diagonal, you have matrix T and upper right and bottom left corners have 4x4 all zero matrices.

\documentclass{article}
\usepackage{mathtools}
\usepackage{blkarray, bigstrut} %
\begin{document}

$\mathbf{T}= \begin{blockarray}{*{6}{c} l} \begin{block}{*{6}{>{\footnotesize}c<{}} l} Rose & Teal & Plum & Sand & Peach & & \\ \end{block} \begin{block}{[*{6}{c}]>{\footnotesize}l<{}} 1&0 &\cdots & 0 & 1 & 0 & small \\ 1&0 &\cdots & 0 &-1\phantom{-} & 0 & medium \\ 0&1 &0 &\cdots & 0 & 1 & large \\ 0&1 &0 &\cdots & 0 &-1\phantom{-} & large \\ \end{block} \end{blockarray}$
%
$\mathbf{S}=\begin{bmatrix} \textbf{T} & \textbf{0} \\ \textbf{0} & \textbf{T} \end{bmatrix}$

\end{document}


• Thank you about your answer, however i would to use elmentry row operations, and other reason I didn't write the central entry. It's not block-matrix. – Ramtin Valedein asl May 19 at 15:46
• @RamtinValedeinasl, how you suppose that people here would know this? Please edit your questions and add missing information (number of columns, number of rows, etc) . – Zarko May 19 at 15:54

You may reduce the intercolumn space, which blkarray decides in a different way than for array.

\documentclass{article}
\usepackage{mathtools}
\usepackage{blkarray, bigstrut} %
\begin{document}
\begin{equation*}
\mathbf{S}=
\begin{blockarray}{*{10}{c} l}
\begin{block}{*{10}{>{$\footnotesize}c<{$}} l}
Rose & Teal & Plum & Sand & Peach & & & & & &\\
\end{block}
\begin{block}{[*{10}{c}]>{$\footnotesize}@{\quad}l<{$}}
1&0 &\cdots & 0     & 1 & 0 &      &\cdots &      & 0 \bigstrut[t] & small \\
1&0 &\cdots & 0     &-1 & 0 &      &\cdots &      & 0              & medium \\
0&1 &0      &\cdots & 0 & 1 &0     &\cdots &      & 0              & large \\
0&1 &0      &\cdots & 0 &-1 &0     &\cdots &      & 0              & large \\
&  &       &       &   &   &      &       &      &                &        \\
&  &       &       &   &   &      &       &      &                &        \\
0&  &\cdots &       & 1 & 0 &\cdots&    0  &  1   & 0              &        \\
0&  &\cdots &       & 1 & 0 &\cdots&    0  &  -1  & 0              &        \\
0&  &\cdots &       & 0 & 1 & 0    &\cdots &  0   &1               &        \\
0&  &\cdots &       & 0 & 1 & 0    &\cdots &  0   &-1              &        \\
\end{block}
\end{blockarray}
\end{equation*}
\end{document}