Link to Current (updated) notes

next previous Next: Index Up: Lecture_06_web Previous: Vectors
Subsections

Matrices and Matrix Operations


Consider methane ( CH$ _4$ ), propane ( C$ _3$H$ _8$ ), and butane ( C$ _4$H$ _{10}$ ).

$\displaystyle \mat {M_{HC}} = \begin{array}{c} \begin{array}{lr} \text{H-column...
...box{}\ \mbox{methane row}\ \mbox{propane row}\ \mbox{butane row} \end{array}$ (06-11)

$\displaystyle \mat {M_{HC}} = \left( \begin{array}{lr} 4 & 1\ 8 & 3 \ 10 & 4 ...
...y}{lr} M_{11} & M_{12}\ M_{21} & M_{22} \ M_{31} & M_{32} \end{array} \right)$ (06-12)



Matrices as a linear transformation of a vector


$\displaystyle \vec{N_{HC}}$ $\displaystyle = ($number of methanes$\displaystyle ,$   number of propanes$\displaystyle ,$   number of butanes$\displaystyle )$ (06-13)
  $\displaystyle = (N_{HC\;m} , N_{HC\;p} , N_{HC\;b} )$ (06-14)
  $\displaystyle = (N_{HC\;1} , N_{HC\;2} , N_{HC\;3} )$ (06-15)

$\displaystyle \vec{N_{HC}} \mat {M_{HC}} \equiv \sum_{i=1}^{3} N_{HC\;i} M_{HC\; ij} = \vec{N}$ (06-16)

The ``summation'' convention is often used, where a repeated index is summed over all its possible values:

$\displaystyle \sum_{i=1}^{p} N_{HC\;i} M_{HC\; ij} \equiv N_{HC\;i} M_{HC\; ij} = N_j$ (06-17)


For example, suppose

$\displaystyle \vec{N_{HC}} = ( \ensuremath{{1.2} \times 10^{12}}$    molecules methane$\displaystyle , \ensuremath{{2.3} \times 10^{13}}$    molecules propane$\displaystyle , \ensuremath{{3.4} \times 10^{14}}$    molecules butane$\displaystyle )$ (06-18)

\begin{displaymath}\begin{split}& \vec{N_{HC}} \mat {M_{HC}} =\ & ( \ensuremath...
...\ensuremath{{2.0} \times 10^{14}} \mbox{ atoms C} ) \end{split}\end{displaymath} (06-19)


Matrix transpose operations

Above the lists (or vectors) of atoms were stored as rows, often it is convenient to store them as columns. The operation to take a row to a column (and vice-versa) is a ``transpose''.

$\displaystyle \mat {M_{HC}}^T = \begin{array}{c} \begin{array}{ccc} \text{metha...
...begin{array}{c} \mbox{}\ \mbox{hydrogen row}\ \mbox{carbon row}\ \end{array}$ (06-20)

$\displaystyle \vec{N_{HC}}^T = \left( \begin{array}{c} \text{number of methanes...
... \left( \begin{array}{c} N_{HC\;m}\ N_{HC\;p} \ N_{HC\;b} \end{array} \right)$ (06-21)


$\displaystyle \mat {M_{HC}}^T \vec{N_{HC}}^T = \vec{N}^T\ \left( \begin{array}...
...ay}{c} \text{number of H-atoms} \ \text{number of C-atoms} \end{array} \right)$ (06-22)


Matrix Multiplication


MATHEMATICA$ ^{\text{\scriptsize {\textregistered }}}$ Example
(notebook Lecture-06)
(html Lecture-06)
(xml+mathml Lecture-06)
Matrices Suppose that some process that produces hyrdocarbons can be modeled with the pressure $ P$ and temperature $ T$ . Suppose (this is an artificial example) that the number of hydrocarbons produced in one millisecond can be related linearly to the pressure and temperature:


\begin{displaymath}\begin{split}\text{number of methanes} = \alpha P + \beta T\\...
... T\ \text{number of butanes} = \epsilon P + \phi T \end{split}\end{displaymath} (06-23)

or

$\displaystyle \vec{N_{HC}}^T = \left( \begin{array}{cc} \alpha & \beta\ \gamma...
...on & \phi \end{array} \right) \left( \begin{array}{c} P\ T \end{array} \right)$ (06-24)

Then, if we wanted to find an operation that takes us from the processing vector $ (P,T)^T$ to the number of hydrogens and carbons:


$\displaystyle \mat {Q} \left( \begin{array}{c} P\ T \end{array} \right) = \mat...
...ay}{c} \text{number of H-atoms} \ \text{number of C-atoms} \end{array} \right)$ (06-25)

Using matrix multiplication,

$\displaystyle \mat {Q} = \left( \begin{array}{cc} 4 \alpha + 8 \gamma + 10 \eps...
...alpha + 3 \gamma + 4 \epsilon & \beta + 3 \delta + 4 \phi\ \end{array} \right)$ (06-26)

is a matrix, which when operating on a vector of pressure and temperature, returns a vector of the amount of hydrogen and carbon.

Matrix multiplication is defined by:

$\displaystyle \mat {A} \mat {B} = \sum_i A_{ki} B_{ij}$ (06-27)

The indices of the matrix defined by the multiplication $ \mat {A} \mat {B} = \mat {C}$ are $ C_{kj}$ .



Matrix Inversion

Sometimes what we wish to know, ``What vector is it ($ \vec{x}$ ), when transformed by some matrix ($ \mat {A}$ ) gives us a particular result ( $ \vec{b} = \mat {A} \vec{x}$ )?''


\begin{displaymath}\begin{split}\mat {A} \vec{x} = \vec{b}\ \mat {A}^{-1} \mat ...
...t {A}^{-1} \vec{b}\ \vec{x} =\mat {A}^{-1} \vec{b} \end{split}\end{displaymath} (06-28)

The inverse of a matrix is defined as something that when multiplied with the matrix leaves a product that has no effect on any vector. This special product matrix is called the identidy matrix.

MATHEMATICA$ ^{\text{\scriptsize {\textregistered }}}$ Example
(notebook Lecture-04)
(html Lecture-04)
(xml+mathml Lecture-04)
Inverting Matrices

$\displaystyle \mat {Q}^{-1} = \frac{1}{\det(\mat {Q})} \left( \begin{array}{cc}...
...\gamma + 4 \epsilon) & -(2 \alpha + 4 \gamma + 5 \epsilon\ \end{array} \right)$ (06-29)

where

$\displaystyle \det(\mat {Q}) \equiv = 4(\alpha \delta - \beta \gamma) - 6(\beta \epsilon - \alpha \phi) + 2(\gamma \phi - \delta \epsilon)$ (06-30)


Linear Independence: When solutions exist


\begin{displaymath}\begin{split}\mat {A} \vec{x} & = \vec{b}\ \left( \begin{arr...
...eft( \begin{array}{c} b_1\ b_2 \end{array} \right) \end{split}\end{displaymath} (06-31)

linear-solutions.png
Figure 6-1: Geometric interpretation of solutions in two dimensions
\resizebox{6in}{!}
{\includegraphics{figures/newbar.eps}}

MATHEMATICA$ ^{\text{\scriptsize {\textregistered }}}$ Example
(notebook Lecture-06)
(html Lecture-06)
(xml+mathml Lecture-06)
Eliminating redundant equations or variables Consider liquid water near the freezing point--dipole interactions will tend to make water molecules form clusters such as H$ _2$   O and H$ _4$   O$ _2$ .

Then the mapping from molecules to the number of atoms becomes:

$\displaystyle \left( \begin{array}{cc} 2 & 4\ 1 & 2 \end{array} \right) \left(...
...ight) = \left( \begin{array}{c} N_{\mbox{H}}\ N_{\mbox{O}} \end{array} \right)$ (06-32)


Linear dependence and the rank of a matrix




© W. Craig Carter 2003-, Massachusetts Institute of Technology