3.1. Matrices and vectors#
Matrices and vectors are convenient tools for representing linear systems with compact notation that can be processed by a computer.
Example: Flash distillation
You are analyzing the molar flow rates resulting from a flash distillation process.
The steady-state mole balances for the total process and component A are
These equations can equivalently be represented using matrices and vectors as
We will learn why these representations are equivalent shortly. Importantly, because our mole balances can be written in this way, they are a system of linear equations that can be solved using techniques of linear algebra.
3.1.1. Definition#
A matrix is a rectangular array of quantities, which we call its elements, that are laid out in horizontal rows and vertical columns. We will typically denote a matrix by a bold, capital letter such as A.
An m x n matrix has m rows and n columns. A is a 2 x 3 matrix. We will sometimes refer to elements of a matrix by their row and column
For example, \(A_{12} = 1\) and \(A_{23} = 16\) for A given above.
A vector is a matrix with either one column (a column vector) or one row (a row vector). We will typically denote a vector by a bold, lowercase letter such as b
b is a 2-element column vector that is also a 2 x 1 matrix, while c is a 3-element row vector that is also a 1 x 3 matrix. When referring to elements of a vector, it typical to only use one index
For b and c given above, \(b_2 = 2\) and \(c_2 = 0\). Note that it becomes ambiguous whether you have a column vector or a row vector if you are refering to elements in this way.
There are some other types of “special” matrices.
Square matrix: a matrix with equal numbers of rows and columns (an n x n matrix).
(3.7)#\[\begin{equation} \begin{bmatrix} 1 & 2 \\ 4 & 3 \end{bmatrix} \end{equation}\]Diagonal matrix: a square matrix with nonzero entries only for the elements on the diagonal, \(A_{ii}\) for \(i = 1, ..., n\).
(3.8)#\[\begin{equation} \begin{bmatrix} 1 & 0 \\ 0 & 3 \end{bmatrix} \end{equation}\]Upper triangular matrix: a square matrix with nonzero entries only on the diagonal or above, \(A_{ij}\) for \(i = 1, ..., n\) and \(j \ge i\). on the diagonal, \(A_{ii}\).
(3.9)#\[\begin{equation} \begin{bmatrix} 1 & 2 \\ 0 & 3 \end{bmatrix} \end{equation}\]Lower triangular matrix: a square matrix with nonzero entries only on the diagonal or below, \(A_{ij}\) for \(i = 1, ..., n\) and \(j \le i\).
(3.10)#\[\begin{equation} \begin{bmatrix} 1 & 0 \\ 4 & 3 \end{bmatrix} \end{equation}\]Identity matrix: a diagonal matrix of ones, typically denoted I.
(3.11)#\[\begin{equation} \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \end{equation}\]
There are several other types of special matrices, but we will leave those for a longer course on linear algebra!