Demo Pages
Arrays are produced by means of the array
environment,
whose syntax and construction are described in Section 4.8.1 on tables.
The array
environment generates a table in math mode, that is
the column entries are interpreted as formula text. For example:
a11
x1
+
a12
x2
+
...
+
a1n
xn
=
b1
a
22
x
1
+
a
22
x
2
+
...
+
a
2n
x
n
=
b
2
.................................................................
a
n1
x
1
+
a
n2
x
2
+
...
+
a
nn
x
n
=
b
n
\[ \begin{array}{*{3}{c@{\:+\:}}c@{\;=\;}c}
a_{11}x_1 & a_{12}x_2 & \cdots & a_{1n}x_n & b_1 \\
a_{22}x_1 & a_{22}x_2 & \cdots & a_{2n}x_n & b_2 \\
\multicolumn{5}{c}{\dotfill}
a_{n1}x_1 & a_{n2}x_2 & \cdots & a_{nn}x_n & b_n
\end{array} \]
As a reminder of the table construction elements (Section
4.8.1): @{t} inserts the contents of t between the adjacent columns. In the
above example, this is \:+\: and \;+\;. The commands \: and \; have not yet
been introduced but they produce small horizontal spacing in math mode
(Section 5.5.1). *{3}{c@{\:+\:}} is an abbreviation for three repetitions of
the column definition c@{\:+\:}. c defines the column to be one of certered
text. \multicolumn{5}{c} says that the next five columns are to be merged and
replaced be one with centered text.\dotfill fills the column with dots. The
above system of equations could be produced somewhat more simply with
\begin{array}{c@{\:+\:}c@{\:+\cdots+\;}c@{\;=\;}c}
It is possible to nest array environments:
(

x
11
x
12
x
21
x
22

Y
Z
)

\[ \left( \begin{array}{c}
\left \begin{array}{cc}
x_{11} & x_{12} \\ x_{21} & x_{22}
\end{array} \right \\
x \\ y \end{array} \right) \]

The outermost array consists of one column with centered text (C). The
first entry in this column is also an array, with two centered columns. This
array is surrounded left and right by vertical lines with adjusted sized.
The array environment is structurally the same as a vertical box. This
means that it treated as a single character within the surrounding
environment, so that it may be coupled with other symbols and construction
elements.
∑
p1
<
p2
<
...
<
pnk
12...n
Δ
p1
p2
...
pnk
p1
p2
...
pnk
∑
q1
<
q2
<
...
<
qk

a
q1
q1
a
q1
q2
...
a
q1
qk
a
q1
q1
a
q1
q2
...
a
q1
qk
...........
...........
...........
...........
a
q1
q1
a
q1
q2
...
a
q1
qk

\[ \sum_{p_1 < p_2 < \cdots < p_{n_k}}^{(1,2,\ldots,n)}
\Delta_{\begin{array}{l}
p_1p_2\cdots p_{n_k} \\ p_1p_2\cdots p_{n_k}
\end{array}}
\sum_{q_1 < q_2\cdots q_k} \left \begin{array}{llcl}
a_{q_1q_1} & a_{q_1q_2} & \cdots & a_{q_1q_k} \\
a_{q_2q_1} & a_{q_2q_2} & \cdots & a_{q_2q_k} \\
\multicolumn{4}{c}\dotfill\\
a_{q_kq_1} & a_{q_kq_2} & \cdots & a_{q_kq_k}
\end{array} \right \]
In this example, an array environment is used as an index on the $
\Delta$. However, the indices appear too large with respect to the rest of
the formula. Section 5.4.6 presents a better solution for array indices.
As for all table environments, an optional vertical positioning parameter
b or t may be included with the array environment. The syntax and results are
described in sections 4.7.3 and 4.8.1. This argument is included only if the
array is to be positioned vertically relative to its top or bottom line
rather than its center.
X

a
1
⋮
a
n

u

v
10
u
+
v
12
120

\[ x  \begin{array}{c}
a_1 \\ \vdots \\ a_n \end{array}
 \begin{array}[t]{cl}
uv & 10\\
u+v & \begin{array}[b]{r}
12\\120 \end{array}
\end{array} \]

We suggest that the reader try to deduce how the various arrays are
structured with the help of the generating text on the right.
Exercise 5.13: The solution for the system of equations
F
x
y
=
0
and

F
xx
"
F
xy
"
F
x
'
F
yx
"
F
yy
"
F
y
'
F
x
'
F
y
'
0

=
0
yields the coordinates for the possible inflection points of F(x,y)=0.
Note: the above displayed formula consists of two subformulas, between
which the word 'and' puls extra spacing of amount \quad are inserted.
Instead of enclosing the array environment within sizeadjusted vertical lines
with \left...\right, one may use a formatting argument {...} (Section 4.8.1)
to produce the vertical lines. Such a structure is called a determinant in mathematics.
Exercise 5.14:
The shortest distance between two straight lines represented by the equations
x

x
1
l
1
=
y

y
1
m
1
=
z

z
1
n
1
and
x

x
2
l
2
=
y

y
2
m
2
=
z

z
2
n
2