Note: You are currently viewing documentation for Moodle 3.8. Up-to-date documentation for the latest stable version of Moodle may be available here: Using TeX Notation 4.

Using TeX Notation 4: Difference between revisions

From MoodleDocs
(Merged into main page)
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Matrices=
#REDIRECT [[Using_TeX_Notation]]
A Matrix is a rectangular array of numbers arranged in rows and columns which can be used to organize numeric information. Matrices can be used to predict trends and outcomes in real situations - i.e. polling.
 
 
==A Matrix==
A matrix can be written and displayed like [[Image: matrices03.gif|A matrix]]
 
In this case the matrix is constructed using the brackets before creating the array:
  $$ M = \left[\begin{array} a&b&1 \ c&d&2 \ e&f&3\end{array}\right] $$
The internal structure of the array is generated by the &, ampersand, and the double backslash.
 
You can also create a grid for the matrix.
 
{| class="nicetable"
|-
|A dashed line
|A solid line
|A mixed line
|-
|[[Image: matrices04.gif]]
|[[Image: matrices05.gif]]
|[[Image: matrices06.gif]]
|-
|$$ M = \left[\begin{array}'''{c.c.c}''' a&b&1 \ '''\hdash''' c&d&2 \ '''\hdash''' e&f&3\end{array}\right] $$
|$$ M = \left[\begin{array}'''{c|c|c}''' a&b&1 \ '''\hline''' c&d&2 \ '''\hline''' e&f&3\end{array}\right] $$
|$$ M = \left[\begin{array}'''{c.c|c}''' a&b&1 \ '''\hline''' c&d&2 \ '''\hdash''' e&f&3\end{array}\right] $$
|}
 
The command sequences here are the {c|c.c} and \hdash and \hline. The pipe, |, and the full stop determine the line type for the vertical line.
 
Matrices also respond to other TeX Notation commands such as size and colour.
 
{| class="nicetable"
|-
|
Colour
| colspan="2"|Size
|-
|[[Image: matrices07.gif]]
|[[Image: matrices08.gif]]
|[[Image: matrices09.gif]]
|-
|$$ '''\blue''' M = \left[\begin{array}{c.c.c} a&b&1 \ \hdash c&d&2 \ \hdash e&f&3\end{array}\right] $$
|$$ '''\fs7''' M = \left[\begin{array}{c.c.c} a&b&1 \ \hdash c&d&2 \ \hdash e&f&3\end{array}\right] $$
|$$ '''\fs2''' M = \left[\begin{array}{c.c.c} a&b&1 \ \hdash c&d&2 \ \hdash e&f&3\end{array}\right] $$
|}
 
==Creating equal and unequal matrices==
Equal and unequal matrices are simply matrices that either share or not share the same number of rows and columns. To be more precise, equal matrices share the same order and each element in the corresponding positions are equal. Anything else is unequal matrices.
 
Actually equal and unequal matrices are constructed along similar lines, but have different shapes:
 
{| class="nicetable"
|-
|Equal Matrix
|An unequal matrix
|-
|[[Image: matrices10.gif]]
|[[Image: matrices11.gif]]
|-
| $$ \left[\begin{array} a&b&1 \ c&d&2 \ e&f&3\end{array}\right] \ = \ \left[\begin{array} 12&11&z \ 10&9&y \ 8&7&x\end{array}\right] $$
| $$ \left[\begin{array} a&b \ c&d \ e&f \end{array}\right] \ \neq \ \left[\begin{array} 12&11&z \ 10&9&y \ 8&7&x\end{array}\right] $$
|}

Latest revision as of 05:21, 18 May 2014

Redirect to: