Q:

Force latex to show a square matrix as square

How can i force latex to print out square matrix as a square matrix with equal width and height in math-mode?
I also read amsmath documentation, but don't found any useful help on it.
For example please for this matrix:
\documentclass{article}

\usepackage{amsmath}

\begin{document}
\[
\left[
\begin{matrix}
\times & \times & \times &&&&&&&\\
\times & \times &  & \times & \times & & & &\\
\times &  & \times & & \times & & & & \\
 & \times & & \times & & \times &&& \\
 & \times & \times & & \times & \times & \times & &&\\
 &&& \times & \times & \times && \times & \times\\
 &&&& \times && \times & \times & \\
 &&&&& \times & \times & \times & \times \\
 &&&&& \times && \times & \times 
\end{matrix}
\right]
\]
\end{document}

result is:

that is a rectangle not an square!

A:

Adjust \arraystretch to an appropriate factor:

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\[
  \renewcommand{\arraystretch}{1.3}
  \begin{bmatrix}
    \times & \times & \times &        &        &        &        &        &        \\
    \times & \times &        & \times & \times &        &        &        &        \\
    \times &        & \times &        & \times &        &        &        &        \\
           & \times &        & \times &        & \times &        &        &        \\
           & \times & \times &        & \times & \times & \times &        &        \\
           &        &        & \times & \times & \times &        & \times & \times \\
           &        &        &        & \times &        & \times & \times &        \\
           &        &        &        &        & \times & \times & \times & \times \\
           &        &        &        &        & \times &        & \times & \times 
  \end{bmatrix}
\]
\end{document}

A:

If you are willing to live under the constraint that all matrix elements occupy the same width (though your question implies that such a constraint may actually be a desirable requirement), then this \sqmatrix[alignment]{content} macro will do the "squaring" automatically.
Inter-element spacing (default 0pt) may be specified with \setstacktabbedgap{length}.
\documentclass{article}
\usepackage{tabstackengine}
\stackMath
\makeatletter
\newcommand\sqmatrix[2][c]{%
  \fixTABwidth{T}%
  \setbox0=\hbox{$\tabbedCenterstack{#2}$}%
  \setstackgap{L}{\dimexpr\maxTAB@width+\tabbed@gap}%
  \tabbedCenterstack[#1]{#2}%
}
\makeatother
\begin{document}
\def\mymatrix{\sqmatrix{
\XXX & \times & \times &&&&&&\\
\times & \times &  & \times & \times & & & &\\
\times &  & \times & & \times & & & & \\
 & \times & & \times & & \times &&& \\
 & \times & \times & & \times & \times & \times & &&\\
 &&& \times & \times & \times && \times & \times\\
 &&&& \times && \times & \times & \\
 &&&&& \times & \times & \times & \times \\
 &&&&& \times && \times & \times%
}}
\def\XXX{\times}
$\left[ \mymatrix \right]$%
\setstacktabbedgap{1ex}%HORIZONTAL GAP BETWEEN ENTRIES
$\left[ \mymatrix \right]$

\small\def\XXX{(x\times x)}
\setstacktabbedgap{0ex}%HORIZONTAL GAP BETWEEN ENTRIES
$\left[ \mymatrix \right]$
\end{document}

A:

You could set the height of each line manually providing the line height in square brackets after each line end:
\times & \times & ... & \times\\[1ex]

To give all lines the same height, you can use a macro:
\documentclass{article}

\usepackage{amsmath}

\newcommand{\squarelineheight}{0.9ex}

\begin{document}
\[
\left[
\begin{matrix}
\times & \times & \times &&&&&&&\\[\squarelineheight]
\times & \times &  & \times & \times & & & &\\[\squarelineheight]
\times &  & \times & & \times & & & & \\[\squarelineheight]
 & \times & & \times & & \times &&& \\[\squarelineheight]
 & \times & \times & & \times & \times & \times & &&\\[\squarelineheight]
 &&& \times & \times & \times && \times & \times\\[\squarelineheight]
 &&&& \times && \times & \times & \\[\squarelineheight]
 &&&&& \times & \times & \times & \times \\[\squarelineheight]
 &&&&& \times && \times & \times 
\end{matrix}
\right]
\]
\end{document}

