LaTeX – Multiline equations, systems and matrices
Multiline Equations
You can present equations with several lines, using the array statement. Inside its declaration you must :
- Define the number of columns
- Define column alignment
- Define column indentation
- Indicate column separator with & symbol &
Example: {lcr}
means: 3 columns with indentations respectively left, center and right.
\begin{array}{rcl} f: R^3 & \to & R \\ (x,y,z) & \to & x + y + z \\ f(x,y,z) & = & x + y + z \end{array}
Case definitions
Used when a definition have two or more cases. Use the case statement. Notice that the spaces after the instances of if were included inside the mbox declarations.
f(n) = \begin{cases} n/2, & \mbox{if } n\mbox{ is even} \\ 3n+1, & \mbox{if } n\mbox{ is odd} \end{cases}
Simultaneous Equations
Here we have a very simple application of the case statement.
Matrices
Matrices can be assembled by using the array statement, like in this example:
Matrix frames are provided by \left and \right. If you suppress these statements, it will be displayed like:
However, there is another statement, the matrix declaration, slightly easier to use:
The frames of the matrix can be displayed in several forms, by just changing the matrix declaration to vmatrix, Vmatrix, bmatrix, Bmatrix or pmatrix, as shown ahead: