5.2 Two dimensional structures

Arrays are possible, however it is not possible to line break an array. Ensure that you do not use math array for structures that really should be tables each cell of which includes mathematics. Small arrays are fine:

\[
\left[\begin{array}{cc} a_{11} & a_{12}\\ a_{21} & a_{22}
\end{array}\right]
\]
\[ \left[\begin{array}{cc} a_{11} & a_{12}\\ a_{21} & a_{22}\end{array}\right] \]

Larger arrays will take some thought — below is the widest array that can be typeset in 20pt on A4 paper. If your array is wider you will need to consider elision. Consider also how hard it would be for a screenreader user to make sense of such a large array in a format that does not permit for navigation but only for a reading from start to finish row by row. In this specific case a substantial amount of time and energy would be wasted working out what matrix was being considered, though, of course, the example was picked to be extreme.

In general, unless writing out the full structure is required for teaching reasons or because the concise form hides too much information for the current purpose it is best to elide or semi-elide all large two dimensional structures. In cases where it is not possible to elide offering up a sentence before the structure is introduced to give the reader some guidance as to what they are about to read can be helpful. This will also permit a reader using large print to notice that columns are missing (for instance) e.g. the 10 by 10 sparse matrix with the diagonal as the main interest point:

\[
\left[\begin{array}{*{10}{c}} 
2 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 
0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 
0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 
0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 
0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 
0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ 
\end{array}\right]
\]
\[ \left[\begin{array}{*{10}{c}} 2 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ \end{array}\right] \]

Arrays will not be line broken or mis-aligned:

\begin{equation} \left|\begin{array}{ccc} a& b& c\\ d& e& f\\ g& h& i \end{array}\right| = a\cdot e \cdot i + b\cdot f\cdot g + c\cdot d\cdot h - c\cdot e\cdot g - b\cdot d\cdot i - a\cdot f\cdot h\\ \end{equation}

Even with used within an eqnarray which could be:

\begin{eqnarray*} \left|\begin{array}{ccc} 2& 1& 0\\ 0& 2& 1\\ 0& 0& 2 \end{array}\right| & =& 2\cdot 2 \cdot 2 + 1 \cdot 1\cdot 0 + 0 \cdot 0 \cdot 0 - 0 \cdot 2 \cdot 0 - 1 \cdot 0 \cdot 2 - 2\cdot 1 \cdot 0\\ & =& 8 + 0 + 0 - 0 - 0 - 0 \end{eqnarray*}

In one reflow capable format used for hard copy large print lines cannot reflow within a root symbol. To permit line breaking in this format the \sqrt[]{} command is overridden (see the preamble section). Please note that in a setting in which students are learning about the equivalence of these notations this override command should be removed from the preamble and great care must be taken with line length within the root. The command is used as standard. In some formats the two equations below will be notationally identical and in others they will not be.

\[ \sqrt {\sum _{i=1}^{13} x_ i^2} = \sqrt {x_1^2 + x_2^2 + x_3^2 + x_4^2 + x_5^2 + x_6^2 + x_7^2 + x_8^2 + x_9^2 + x_{10}^2+ x_{11}^2 + x_{12}^2 + x_{13}^2 } \]\[ \sqrt {\sum _{i=1}^{13} x_ i^2} = \left(x_1^2 + x_2^2 + x_3^2 + x_4^2 + x_5^2 + x_6^2 + x_7^2 + x_8^2 + x_9^2 + x_{10}^2+ x_{11}^2 + x_{12}^2 + x_{13}^2 \right)^{\frac{1}{2}} \]\[ \sqrt [3]{a + \sqrt [5]{\frac{b + c + d}{e}} + f} \]

Stackrel can be used to stack any of the symbols mentioned earlier:

\[
\stackrel{a}{\longrightarrow}
\]
\[ \stackrel{a}{\longrightarrow } \]

It is possible to produce other 2 dimensional structures that cannot be linebroken (see below). Again, elision would be required for very large print and to enhance readability for a screenreader user. Some line breaking algorithms will break at the first plus of the second continued fraction, this would result in a misleading layout hence braces are required around each of the structures. This leaves no point at which to line break. The following can be displayed at 20pt on A4 paper but anything larger could not. This is another situation where elision is required for both display and to ensure that the structure can be understood efficiently by a screenreader user.

\[
{a + \frac{1}{b + \frac{1}{c + \frac{1}{d + \frac{1}
{e + \frac{1}{f + \frac{1}{g + \frac{1}{h}}}}}}}} \qquad 
{a + \frac{1}{\displaystyle b + \frac{1}
{\displaystyle c + \frac{1}{\displaystyle d + \frac{1}
{\displaystyle e + \frac{1}{\displaystyle f + \frac{1}
{\displaystyle g + \frac{1}{h}}}}}}}}
\]
\[ {a + \frac{1}{b + \frac{1}{c + \frac{1}{d + \frac{1}{e + \frac{1}{f + \frac{1}{g + \frac{1}{h}}}}}}}} \qquad {a + \frac{1}{\displaystyle b + \frac{1}{\displaystyle c + \frac{1}{\displaystyle d + \frac{1}{\displaystyle e + \frac{1}{\displaystyle f + \frac{1}{\displaystyle g + \frac{1}{h}}}}}}}} \]

Finally we test the newcommands defined in the preamble. These use subscript and superscript within them. The definitions of such newcommands need to be copied and pasted into the configuration file for two of the transformations.

 
\[ 
\xsb \xsp \xsbnum{2}
\]
\[ x_{1}x^{2}x_{2} \]