I hope to use sideways for my big matrix, like this and this.
It looks straight forward. But it's not working for me.
\documentclass[a4paper,12pt]{article}
\usepackage{amsmath}
\usepackage{rotating}
\begin{document}
\begin{sideways}
\begin{equation}
\begin{bmatrix}
\frac{1}{\phi_1} &
\frac{1}{\phi_1} &
\frac{1}{\phi_1} &
\frac{1}{\phi_1} &
0 &
0 &
0 &
0 &
0 &
0 \\
0 &
\frac{1}{\phi_2} &
\frac{1}{\phi_2} &
\frac{1}{\phi_2} &
\frac{1}{\phi_2} &
\frac{1}{\phi_2} &
\frac{1}{\phi_2} &
0 &
0 &
0 \\
0 &
0 &
\frac{1}{\phi_3} &
\frac{1}{\phi_3} &
0 &
\frac{1}{\phi_3} &
\frac{1}{\phi_3} &
\frac{1}{\phi_3} &
\frac{1}{\phi_3} &
0 \\
0 &
0 &
0 &
\frac{1}{\phi_4} &
0 &
0 &
\frac{1}{\phi_4} &
0 &
\frac{1}{\phi_4} &
\frac{1}{\phi_4} \\
\frac{1}{1+\mathrm{e}^{a2+m}} &
\frac{-1}{1+\mathrm{e}^{-(a2+m)}} &
\frac{-1}{1+\mathrm{e}^{-(a2+m)}} &
\frac{-1}{1+\mathrm{e}^{-(a2+m)}} &
0 &
0 &
0 &
0 &
0 &
0 \\
0 &
\frac{1}{1+\mathrm{e}^{a3}} &
\frac{-1}{1+\mathrm{e}^{-a3}} &
\frac{-1}{1+\mathrm{e}^{-a3}} &
\frac{1}{1+\mathrm{e}^{a3+m}} &
\frac{-1}{1+\mathrm{e}^{-(a3+m)}} &
\frac{-1}{1+\mathrm{e}^{-(a3+m)}} &
0 &
0 &
0 \\
0 &
0 &
\frac{1}{1+\mathrm{e}^{a4}} &
\frac{-1}{1+\mathrm{e}^{-a4}} &
0 &
\frac{1}{1+\mathrm{e}^{a4}} &
\frac{-1}{1+\mathrm{e}^{-a4}} &
\frac{1}{1+\mathrm{e}^{a4+m}} &
\frac{-1}{1+\mathrm{e}^{-(a4+m)}} &
0 \\
0 &
0 &
0 &
\frac{1}{1+\mathrm{e}^{a5}} &
0 &
0 &
\frac{1}{1+\mathrm{e}^{a5}} &
0 &
\frac{1}{1+\mathrm{e}^{a5}} &
\frac{1}{1+\mathrm{e}^{a5+m}} \\
\frac{1}{1+\mathrm{e}^{a2+m}} &
\frac{-1}{1+\mathrm{e}^{-(a2+m)}} &
\frac{-1}{1+\mathrm{e}^{-(a2+m)}} &
\frac{-1}{1+\mathrm{e}^{-(a2+m)}} &
\frac{1}{1+\mathrm{e}^{a3+m}} &
\frac{-1}{1+\mathrm{e}^{-(a3+m)}} &
\frac{-1}{1+\mathrm{e}^{-(a2+m)}} &
\frac{1}{1+\mathrm{e}^{a4+m}} &
\frac{-1}{1+\mathrm{e}^{-(a4+m)}} &
\frac{1}{1+\mathrm{e}^{a5+m}}
\end{bmatrix}
\end{equation}
\end{sideways}
\end{document}
But it does not seem to be working.

I would expect that it takes maths environments?

minipageenvironment. So it should go\begin{sideways}\begin{minipage}{\textheight}\begin{equation}\begin{bmatrix} ... \end{bmatrix}\end{equation}\end{minipage}\end{sideways}– Mike Renfro Oct 27 '14 at 19:49