Matrix methods are fundamental tools in chemical engineering for solving systems of linear equations that arise in process modeling, reaction kinetics, and control systems. In the Kenyan chemical industry, efficient computation of matrix operations supports the design and optimization of chemical processes, ensuring safety and economic viability. This chapter focuses on advanced matrix techniques including matrix operations, determinants, inverses, solving simultaneous equations, and eigenvalue problems relevant to chemical engineering applications.
Matrix operations such as addition, multiplication, and scalar multiplication are essential for handling data and equations in chemical engineering. Matrix multiplication, in particular, is used to combine transformation steps, represent reaction networks, and solve linear systems.
The product of two matrices \(A\) of size \(m \times n\) and \(B\) of size \(n \times p\) is a matrix \(C\) of size \(m \times p\), where each element \(c_{ij}\) is given by:
$$ c_{ij} = \sum_{k=1}^n a_{ik} b_{kj} $$
Example 1: In a chemical plant, matrix \(A\) represents conversion factors for 3 reactants, and matrix \(B\) represents input quantities. Calculate the output matrix \(C = AB\).
Given:
$$ A = \begin{bmatrix} 1 & 2 & 0 \\ -1 & 3 & 1 \\ 4 & 0 & 2 \end{bmatrix}, \quad B = \begin{bmatrix} 3 \\ 1 \\ 2 \end{bmatrix} $$
$$ c_{11} = (1)(3) + (2)(1) + (0)(2) $$$$ = 3 + 2 + 0 = 5 $$
$$ c_{21} = (-1)(3) + (3)(1) + (1)(2) $$$$ = -3 + 3 + 2 = 2 $$
$$ c_{31} = (4)(3) + (0)(1) + (2)(2) $$$$ = 12 + 0 + 4 = 16 $$
Answer:
$$ C = \begin{bmatrix} 5 \\ 2 \\ 16 \end{bmatrix} $$
Example 2: Calculate the product of matrices
$$ A = \begin{bmatrix} 2 & 1 & 0 \\ 0 & -1 & 3 \\ 1 & 2 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 0 \\ 3 & -2 \\ 4 & 1 \end{bmatrix} $$
Calculate matrix \(C = AB\) (size \(3 \times 2\)).
Calculate each element:
$$ c_{11} = (2)(1) + (1)(3) + (0)(4) = 2 + 3 + 0 = 5 $$
$$ c_{12} = (2)(0) + (1)(-2) + (0)(1) = 0 - 2 + 0 = -2 $$
$$ c_{21} = (0)(1) + (-1)(3) + (3)(4) = 0 - 3 + 12 = 9 $$
$$ c_{22} = (0)(0) + (-1)(-2) + (3)(1) = 0 + 2 + 3 = 5 $$
$$ c_{31} = (1)(1) + (2)(3) + (1)(4) = 1 + 6 + 4 = 11 $$
$$ c_{32} = (1)(0) + (2)(-2) + (1)(1) = 0 - 4 + 1 = -3 $$
Answer:
$$ C = \begin{bmatrix} 5 & -2 \\ 9 & 5 \\ 11 & -3 \end{bmatrix} $$
Example 3: Show that matrix multiplication is not commutative by calculating \(AB\) and \(BA\) for
$$ A = \begin{bmatrix} 2 & 3 \\ 1 & 0 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 4 \\ 2 & 5 \end{bmatrix} $$
Calculate \(AB\):
$$ AB = \begin{bmatrix} (2)(1) + (3)(2) & (2)(4) + (3)(5) \\ (1)(1) + (0)(2) & (1)(4) + (0)(5) \end{bmatrix} = \begin{bmatrix} 2 + 6 & 8 + 15 \\ 1 + 0 & 4 + 0 \end{bmatrix} = \begin{bmatrix} 8 & 23 \\ 1 & 4 \end{bmatrix} $$
Calculate \(BA\):
$$ BA = \begin{bmatrix} (1)(2) + (4)(1) & (1)(3) + (4)(0) \\ (2)(2) + (5)(1) & (2)(3) + (5)(0) \end{bmatrix} = \begin{bmatrix} 2 + 4 & 3 + 0 \\ 4 + 5 & 6 + 0 \end{bmatrix} = \begin{bmatrix} 6 & 3 \\ 9 & 6 \end{bmatrix} $$
Answer:
$$ AB = \begin{bmatrix} 8 & 23 \\ 1 & 4 \end{bmatrix} \neq BA = \begin{bmatrix} 6 & 3 \\ 9 & 6 \end{bmatrix} $$
The determinant of a \(3 \times 3\) matrix is a scalar value that provides important properties such as invertibility and volume scaling in transformations. For matrix
$$ A = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} $$
the determinant \(|A|\) is calculated as:
$$ |A| = a(ei, fh) - b(di, fg) + c(dh, eg) $$
Example 1: Calculate the determinant of
$$ A = \begin{bmatrix} 2 & 0 & 1 \\ 3 & 4 & -1 \\ 0 & 2 & 5 \end{bmatrix} $$
$$ |A| = 2(4 \times 5 - (-1) \times 2) - 0(3 \times 5 - (-1) \times 0) + 1(3 \times 2 - 4 \times 0) $$
Calculate each term:
$$ 2 (20 + 2) = 2 \times 22 = 44 $$
$$ 0 \times (15 - 0) = 0 $$
$$ 1 \times (6 - 0) = 6 $$
Sum:
$$ 44 + 0 + 6 = 50 $$
Answer: \(|A| = 50\)
Example 2: Find the determinant of
$$ A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & -1 & 4 \\ 5 & 6 & 0 \end{bmatrix} $$
Calculate:
$$ |A| = 1((-1)(0) - 4 \times 6) - 2(0 \times 0 - 4 \times 5) + 3(0 \times 6 - (-1) \times 5) $$
Calculate each term:
$$ 1(0 - 24) = -24 $$
$$ -2(0 - 20) = -2(-20) = 40 $$
$$ 3(0 + 5) = 15 $$
Sum:
$$ -24 + 40 + 15 = 31 $$
Answer: \(|A| = 31\)
Example 3: Determine the determinant of
$$ A = \begin{bmatrix} 4 & 1 & -2 \\ 3 & 0 & 5 \\ -1 & 2 & 1 \end{bmatrix} $$
Calculate:
$$ |A| = 4(0 \times 1 - 5 \times 2) - 1(3 \times 1 - 5 \times (-1)) + (-2)(3 \times 2 - 0 \times (-1)) $$
Calculate each term:
$$ 4(0 - 10) = 4 \times (-10) = -40 $$
$$ -1(3 - (-5)) = -1(3 + 5) = -8 $$
$$ -2(6 - 0) = -2 \times 6 = -12 $$
Sum:
$$ -40 - 8 - 12 = -60 $$
Answer: \(|A| = -60\)
The inverse of a \(3 \times 3\) matrix \(A\), denoted \(A^{-1}\), satisfies \(AA^{-1} = I\), where \(I\) is the identity matrix. The inverse exists only if \(|A| \neq 0\). The inverse is calculated using the formula:
$$ A^{-1} = \frac{1}{|A|} \text{adj}(A) $$
where \(\text{adj}(A)\) is the adjugate matrix, the transpose of the cofactor matrix.
Example 1: Find the inverse of
$$ A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{bmatrix} $$
Step 1: Calculate \(|A|\):
$$ |A| = 1(1 \times 0 - 4 \times 6) - 2(0 \times 0 - 4 \times 5) + 3(0 \times 6 - 1 \times 5) $$
Calculate each term:
$$ 1(0 - 24) = -24 $$
$$ -2(0 - 20) = -2(-20) = 40 $$
$$ 3(0 - 5) = -15 $$
Sum:
$$ -24 + 40 - 15 = 1 $$
Step 2: Calculate cofactors:
\[ C_{11} = \det \begin{bmatrix} 1 & 4 \\ 6 & 0 \end{bmatrix} = (1)(0) - (4)(6) = -24 \]
\[ C_{12} = -\det \begin{bmatrix} 0 & 4 \\ 5 & 0 \end{bmatrix} = -[0 \times 0 - 4 \times 5] = -(-20) = 20 \]
\[ C_{13} = \det \begin{bmatrix} 0 & 1 \\ 5 & 6 \end{bmatrix} = 0 \times 6 - 1 \times 5 = -5 \]
\[ C_{21} = -\det \begin{bmatrix} 2 & 3 \\ 6 & 0 \end{bmatrix} = -[2 \times 0 - 3 \times 6] = -(-18) = 18 \]
\[ C_{22} = \det \begin{bmatrix} 1 & 3 \\ 5 & 0 \end{bmatrix} = 1 \times 0 - 3 \times 5 = -15 \]
\[ C_{23} = -\det \begin{bmatrix} 1 & 2 \\ 5 & 6 \end{bmatrix} = -[1 \times 6 - 2 \times 5] = -[6 - 10] = 4 \]
\[ C_{31} = \det \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} = 2 \times 4 - 3 \times 1 = 8 - 3 = 5 \]
\[ C_{32} = -\det \begin{bmatrix} 1 & 3 \\ 0 & 4 \end{bmatrix} = -[1 \times 4 - 3 \times 0] = -4 \]
\[ C_{33} = \det \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} = 1 \times 1 - 2 \times 0 = 1 \]
Step 3: Cofactor matrix:
$$ \begin{bmatrix} -24 & 20 & -5 \\ 18 & -15 & 4 \\ 5 & -4 & 1 \end{bmatrix} $$
Step 4: Adjugate matrix (transpose cofactor matrix):
$$ \text{adj}(A) = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix} $$
Step 5: Since \(|A|=1\), inverse is adjugate:
$$ A^{-1} = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix} $$
Answer:
$$ A^{-1} = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix} $$
Example 2: Find the inverse of
$$ A = \begin{bmatrix} 4 & 7 & 2 \\ 3 & 6 & 1 \\ 2 & 5 & 1 \end{bmatrix} $$
Step 1: Calculate \(|A|\):
$$ |A| = 4(6 \times 1 - 1 \times 5) - 7(3 \times 1 - 1 \times 2) + 2(3 \times 5 - 6 \times 2) $$
Calculate each term:
$$ 4(6 - 5) = 4 \times 1 = 4 $$
$$ -7(3 - 2) = -7 \times 1 = -7 $$
$$ 2(15 - 12) = 2 \times 3 = 6 $$
Sum:
$$ 4 - 7 + 6 = 3 $$
Step 2: Calculate cofactors:
\[ C_{11} = \det \begin{bmatrix} 6 & 1 \\ 5 & 1 \end{bmatrix} = 6 \times 1 - 1 \times 5 = 1 \]
\[ C_{12} = -\det \begin{bmatrix} 3 & 1 \\ 2 & 1 \end{bmatrix} = -[3 \times 1 - 1 \times 2] = - (3 - 2) = -1 \]
\[ C_{13} = \det \begin{bmatrix} 3 & 6 \\ 2 & 5 \end{bmatrix} = 3 \times 5 - 6 \times 2 = 15 - 12 = 3 \]
\[ C_{21} = -\det \begin{bmatrix} 7 & 2 \\ 5 & 1 \end{bmatrix} = -[7 \times 1 - 2 \times 5] = - (7 - 10) = 3 \]
\[ C_{22} = \det \begin{bmatrix} 4 & 2 \\ 2 & 1 \end{bmatrix} = 4 \times 1 - 2 \times 2 = 4 - 4 = 0 \]
\[ C_{23} = -\det \begin{bmatrix} 4 & 7 \\ 2 & 5 \end{bmatrix} = -[4 \times 5 - 7 \times 2] = - (20 - 14) = -6 \]
\[ C_{31} = \det \begin{bmatrix} 7 & 2 \\ 6 & 1 \end{bmatrix} = 7 \times 1 - 2 \times 6 = 7 - 12 = -5 \]
\[ C_{32} = -\det \begin{bmatrix} 4 & 2 \\ 3 & 1 \end{bmatrix} = -[4 \times 1 - 2 \times 3] = - (4 - 6) = 2 \]
\[ C_{33} = \det \begin{bmatrix} 4 & 7 \\ 3 & 6 \end{bmatrix} = 4 \times 6 - 7 \times 3 = 24 - 21 = 3 \]
Step 3: Cofactor matrix:
$$ \begin{bmatrix} 1 & -1 & 3 \\ 3 & 0 & -6 \\ -5 & 2 & 3 \end{bmatrix} $$
Step 4: Adjugate matrix (transpose):
$$ \text{adj}(A) = \begin{bmatrix} 1 & 3 & -5 \\ -1 & 0 & 2 \\ 3 & -6 & 3 \end{bmatrix} $$
Step 5: Calculate inverse:
$$ A^{-1} = \frac{1}{3} \begin{bmatrix} 1 & 3 & -5 \\ -1 & 0 & 2 \\ 3 & -6 & 3 \end{bmatrix} = \begin{bmatrix} \frac{1}{3} & 1 & -\frac{5}{3} \\ -\frac{1}{3} & 0 & \frac{2}{3} \\ 1 & -2 & 1 \end{bmatrix} $$
Answer:
$$ A^{-1} = \begin{bmatrix} \frac{1}{3} & 1 & -\frac{5}{3} \\ -\frac{1}{3} & 0 & \frac{2}{3} \\ 1 & -2 & 1 \end{bmatrix} $$
Example 3: Find the inverse of
$$ A = \begin{bmatrix} 1 & 0 & 2 \\ -1 & 3 & 1 \\ 3 & 1 & 0 \end{bmatrix} $$
Step 1: Calculate \(|A|\):
$$ |A| = 1(3 \times 0 - 1 \times 1) - 0(-1 \times 0 - 1 \times 3) + 2(-1 \times 1 - 3 \times 3) $$
Calculate each term:
$$ 1(0 - 1) = -1 $$
$$ 0 \times (0 - (-3)) = 0 $$
$$ 2(-1 - 9) = 2 \times (-10) = -20 $$
Sum:
$$ -1 + 0 - 20 = -21 $$
Step 2: Calculate cofactors:
\[ C_{11} = \det \begin{bmatrix} 3 & 1 \\ 1 & 0 \end{bmatrix} = 3 \times 0 - 1 \times 1 = -1 \]
\[ C_{12} = -\det \begin{bmatrix} -1 & 1 \\ 3 & 0 \end{bmatrix} = -[(-1)(0) - 1 \times 3] = - (0 - 3) = 3 \]
\[ C_{13} = \det \begin{bmatrix} -1 & 3 \\ 3 & 1 \end{bmatrix} = (-1)(1) - 3 \times 3 = -1 - 9 = -10 \]
\[ C_{21} = -\det \begin{bmatrix} 0 & 2 \\ 1 & 0 \end{bmatrix} = -[0 \times 0 - 2 \times 1] = - (0 - 2) = 2 \]
\[ C_{22} = \det \begin{bmatrix} 1 & 2 \\ 3 & 0 \end{bmatrix} = 1 \times 0 - 2 \times 3 = -6 \]
\[ C_{23} = -\det \begin{bmatrix} 1 & 0 \\ 3 & 1 \end{bmatrix} = -[1 \times 1 - 0 \times 3] = - (1 - 0) = -1 \]
\[ C_{31} = \det \begin{bmatrix} 0 & 2 \\ 3 & 1 \end{bmatrix} = 0 \times 1 - 2 \times 3 = -6 \]
\[ C_{32} = -\det \begin{bmatrix} 1 & 2 \\ -1 & 1 \end{bmatrix} = -[1 \times 1 - 2 \times (-1)] = - (1 + 2) = -3 \]
\[ C_{33} = \det \begin{bmatrix} 1 & 0 \\ -1 & 3 \end{bmatrix} = 1 \times 3 - 0 \times (-1) = 3 \]
Step 3: Cofactor matrix:
$$ \begin{bmatrix} -1 & 3 & -10 \\ 2 & -6 & -1 \\ -6 & -3 & 3 \end{bmatrix} $$
Step 4: Adjugate matrix (transpose):
$$ \text{adj}(A) = \begin{bmatrix} -1 & 2 & -6 \\ 3 & -6 & -3 \\ -10 & -1 & 3 \end{bmatrix} $$
Step 5: Calculate inverse:
$$ A^{-1} = \frac{1}{-21} \begin{bmatrix} -1 & 2 & -6 \\ 3 & -6 & -3 \\ -10 & -1 & 3 \end{bmatrix} = \begin{bmatrix} \frac{1}{21} & -\frac{2}{21} & \frac{6}{21} \\ -\frac{3}{21} & \frac{6}{21} & \frac{3}{21} \\ \frac{10}{21} & \frac{1}{21} & -\frac{3}{21} \end{bmatrix} $$
Answer:
$$ A^{-1} = \begin{bmatrix} \frac{1}{21} & -\frac{2}{21} & \frac{2}{7} \\ -\frac{1}{7} & \frac{2}{7} & \frac{1}{7} \\ \frac{10}{21} & \frac{1}{21} & -\frac{1}{7} \end{bmatrix} $$
Systems of linear equations arise in chemical engineering for material balances, reaction rate equations, and process control. Using matrices, the system
$$ AX = B $$
can be solved for the unknown vector \(X\) if \(A\) is invertible, by
$$ X = A^{-1}B $$
Example 1: Solve the system
\[ \begin{cases} x + y + z = 6 \\ 2x, y + 3z = 14 \\ -x + 4y + z = 2 \end{cases} \]
Write matrices:
$$ A = \begin{bmatrix} 1 & 1 & 1 \\ 2 & -1 & 3 \\ -1 & 4 & 1 \end{bmatrix}, \quad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad B = \begin{bmatrix} 6 \\ 14 \\ 2 \end{bmatrix} $$
Step 1: Calculate \(|A|\):
$$ |A| = 1((-1)(1) - 3 \times 4) - 1(2 \times 1 - 3 \times (-1)) + 1(2 \times 4 - (-1) \times (-1)) $$
Calculate each term:
$$ 1(-1 - 12) = 1 \times (-13) = -13 $$
$$ -1(2 - (-3)) = -1(2 + 3) = -5 $$
$$ 1(8 - 1) = 7 $$
Sum:
$$ -13 - 5 + 7 = -11 $$
Step 2: Calculate \(A^{-1}\) (cofactor matrix and adjugate omitted here for brevity, but done similarly).
Step 3: Using Cramer's rule or matrix inverse, solve \(X = A^{-1} B\).
Calculate determinants for \(x, y, z\):
$$ A_x = \begin{bmatrix} 6 & 1 & 1 \\ 14 & -1 & 3 \\ 2 & 4 & 1 \end{bmatrix}, \quad A_y = \begin{bmatrix} 1 & 6 & 1 \\ 2 & 14 & 3 \\ -1 & 2 & 1 \end{bmatrix}, \quad A_z = \begin{bmatrix} 1 & 1 & 6 \\ 2 & -1 & 14 \\ -1 & 4 & 2 \end{bmatrix} $$
Calculate \(|A_x|\):
$$ |A_x| = 6((-1)(1) - 3 \times 4) - 1(14 \times 1 - 3 \times 2) + 1(14 \times 4 - (-1) \times 2) $$
Calculate each term:
$$ 6(-1 - 12) = 6 \times (-13) = -78 $$
$$ -1(14 - 6) = -1 \times 8 = -8 $$
$$ 1(56 + 2) = 58 $$
Sum:
$$ -78 - 8 + 58 = -28 $$
Calculate \(|A_y|\):
$$ |A_y| = 1(14 \times 1 - 3 \times 2) - 6(2 \times 1 - 3 \times (-1)) + 1(2 \times 2 - 14 \times (-1)) $$
Calculate each term:
$$ 1(14 - 6) = 8 $$
$$ -6(2 + 3) = -6 \times 5 = -30 $$
$$ 1(4 + 14) = 18 $$
Sum:
$$ 8 - 30 + 18 = -4 $$
Calculate \(|A_z|\):
$$ |A_z| = 1((-1)(2) - 14 \times 4) - 1(2 \times 2 - 14 \times (-1)) + 6(2 \times 4 - (-1) \times (-1)) $$
Calculate each term:
$$ 1(-2 - 56) = -58 $$
$$ -1(4 + 14) = -18 $$
$$ 6(8 - 1) = 6 \times 7 = 42 $$
Sum:
$$ -58 - 18 + 42 = -34 $$
Step 4: Calculate \(x, y, z\):
$$ x = \frac{|A_x|}{|A|} = \frac{-28}{-11} = \frac{28}{11} \approx 2.545 $$
$$ y = \frac{|A_y|}{|A|} = \frac{-4}{-11} = \frac{4}{11} \approx 0.364 $$
$$ z = \frac{|A_z|}{|A|} = \frac{-34}{-11} = \frac{34}{11} \approx 3.091 $$
Answer:
$$ x = 2.545, \quad y = 0.364, \quad z = 3.091 $$
Example 2: Solve for \(x, y, z\):
\[ \begin{cases} 3x + y - 2z = 5 \\ -2x + 4y + 3z = 6 \\ x - 3y + z = 4 \end{cases} \]
Write matrices:
$$ A = \begin{bmatrix} 3 & 1 & -2 \\ -2 & 4 & 3 \\ 1 & -3 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 5 \\ 6 \\ 4 \end{bmatrix} $$
Calculate \(|A|\):
$$ |A| = 3(4 \times 1 - 3 \times (-3)) - 1(-2 \times 1 - 3 \times 1) + (-2)(-2 \times (-3) - 4 \times 1) $$
Calculate each term:
$$ 3(4 + 9) = 3 \times 13 = 39 $$
$$ -1(-2 - 3) = -1 \times (-5) = 5 $$
$$ -2(6 - 4) = -2 \times 2 = -4 $$
Sum:
$$ 39 + 5 - 4 = 40 $$
Calculate determinants \(|A_x|, |A_y|, |A_z|\):
$$ A_x = \begin{bmatrix} 5 & 1 & -2 \\ 6 & 4 & 3 \\ 4 & -3 & 1 \end{bmatrix} $$
$$ |A_x| = 5(4 \times 1 - 3 \times (-3)) - 1(6 \times 1 - 3 \times 4) + (-2)(6 \times (-3) - 4 \times 4) $$
Calculate each term:
$$ 5(4 + 9) = 5 \times 13 = 65 $$
$$ -1(6 - 12) = -1 \times (-6) = 6 $$
$$ -2(-18 - 16) = -2 \times (-34) = 68 $$
Sum:
$$ 65 + 6 + 68 = 139 $$
$$ A_y = \begin{bmatrix} 3 & 5 & -2 \\ -2 & 6 & 3 \\ 1 & 4 & 1 \end{bmatrix} $$
$$ |A_y| = 3(6 \times 1 - 3 \times 4) - 5(-2 \times 1 - 3 \times 1) + (-2)(-2 \times 4 - 6 \times 1) $$
Calculate each term:
$$ 3(6 - 12) = 3 \times (-6) = -18 $$
$$ -5(-2 - 3) = -5 \times (-5) = 25 $$
$$ -2(-8 - 6) = -2 \times (-14) = 28 $$
Sum:
$$ -18 + 25 + 28 = 35 $$
$$ A_z = \begin{bmatrix} 3 & 1 & 5 \\ -2 & 4 & 6 \\ 1 & -3 & 4 \end{bmatrix} $$
$$ |A_z| = 3(4 \times 4 - 6 \times (-3)) - 1(-2 \times 4 - 6 \times 1) + 5(-2 \times (-3) - 4 \times 1) $$
Calculate each term:
$$ 3(16 + 18) = 3 \times 34 = 102 $$
$$ -1(-8 - 6) = -1 \times (-14) = 14 $$
$$ 5(6 - 4) = 5 \times 2 = 10 $$
Sum:
$$ 102 + 14 + 10 = 126 $$
Calculate unknowns:
$$ x = \frac{139}{40} = 3.475 $$
$$ y = \frac{35}{40} = 0.875 $$
$$ z = \frac{126}{40} = 3.15 $$
Answer:
$$ x = 3.475, \quad y = 0.875, \quad z = 3.15 $$
Example 3: Solve the system
\[ \begin{cases} 2x + 3y, z = 7 \\ -3x + 4y + 2z = 4 \\ x - 2y + 5z = 10 \end{cases} \]
Write matrices:
$$ A = \begin{bmatrix} 2 & 3 & -1 \\ -3 & 4 & 2 \\ 1 & -2 & 5 \end{bmatrix}, \quad B = \begin{bmatrix} 7 \\ 4 \\ 10 \end{bmatrix} $$
Calculate \(|A|\):
$$ |A| = 2(4 \times 5 - 2 \times (-2)) - 3(-3 \times 5 - 2 \times 1) + (-1)(-3 \times (-2) - 4 \times 1) $$
Calculate each term:
$$ 2(20 + 4) = 2 \times 24 = 48 $$
$$ -3(-15 - 2) = -3 \times (-17) = 51 $$
$$ -1(6 - 4) = -1 \times 2 = -2 $$
Sum:
$$ 48 + 51 - 2 = 97 $$
Calculate determinants \(|A_x|, |A_y|, |A_z|\):
$$ A_x = \begin{bmatrix} 7 & 3 & -1 \\ 4 & 4 & 2 \\ 10 & -2 & 5 \end{bmatrix} $$
$$ |A_x| = 7(4 \times 5 - 2 \times (-2)) - 3(4 \times 5 - 2 \times 10) + (-1)(4 \times (-2) - 4 \times 10) $$
Calculate each term:
$$ 7(20 + 4) = 7 \times 24 = 168 $$
$$ -3(20 - 20) = -3 \times 0 = 0 $$
$$ -1(-8 - 40) = -1 \times (-48) = 48 $$
Sum:
$$ 168 + 0 + 48 = 216 $$
$$ A_y = \begin{bmatrix} 2 & 7 & -1 \\ -3 & 4 & 2 \\ 1 & 10 & 5 \end{bmatrix} $$
$$ |A_y| = 2(4 \times 5 - 2 \times 10) - 7(-3 \times 5 - 2 \times 1) + (-1)(-3 \times 10 - 4 \times 1) $$
Calculate each term:
$$ 2(20 - 20) = 2 \times 0 = 0 $$
$$ -7(-15 - 2) = -7 \times (-17) = 119 $$
$$ -1(-30 - 4) = -1 \times (-34) = 34 $$
Sum:
$$ 0 + 119 + 34 = 153 $$
$$ A_z = \begin{bmatrix} 2 & 3 & 7 \\ -3 & 4 & 4 \\ 1 & -2 & 10 \end{bmatrix} $$
$$ |A_z| = 2(4 \times 10 - 4 \times (-2)) - 3(-3 \times 10 - 4 \times 1) + 7(-3 \times (-2) - 4 \times 1) $$
Calculate each term:
$$ 2(40 + 8) = 2 \times 48 = 96 $$
$$ -3(-30 - 4) = -3 \times (-34) = 102 $$
$$ 7(6 - 4) = 7 \times 2 = 14 $$
Sum:
$$ 96 + 102 + 14 = 212 $$
Calculate unknowns:
$$ x = \frac{216}{97} \approx 2.227 $$
$$ y = \frac{153}{97} \approx 1.577 $$
$$ z = \frac{212}{97} \approx 2.185 $$
Answer:
$$ x = 2.227, \quad y = 1.577, \quad z = 2.185 $$
Eigenvalues and eigenvectors are critical in chemical engineering for stability analysis, reaction kinetics, and dynamic system modeling. For a square matrix \(A\), eigenvalues \(\lambda\) satisfy:
$$ |A - \lambda I| = 0 $$
where \(I\) is the identity matrix. Corresponding eigenvectors \(x\) satisfy:
$$ (A - \lambda I) x = 0 $$
Example 1: Find eigenvalues and eigenvectors of
$$ A = \begin{bmatrix} 4 & 1 \\ 2 & 3 \end{bmatrix} $$
Step 1: Calculate eigenvalues by solving
$$ |A - \lambda I| = 0 $$
$$ \begin{vmatrix} 4 - \lambda & 1 \\ 2 & 3 - \lambda \end{vmatrix} = 0 $$
Calculate determinant:
$$ (4 - \lambda)(3 - \lambda) - 2 \times 1 = 0 $$
$$ (4 - \lambda)(3 - \lambda) - 2 = 0 $$
Expand:
$$ 12 - 4\lambda - 3\lambda + \lambda^2 - 2 = 0 $$
Simplify:
$$ \lambda^2 - 7\lambda + 10 = 0 $$
Step 2: Solve quadratic equation:
$$ \lambda = \frac{7 \pm \sqrt{49 - 40}}{2} = \frac{7 \pm 3}{2} $$
Eigenvalues:
$$ \lambda_1 = \frac{7 + 3}{2} = 5, \quad \lambda_2 = \frac{7 - 3}{2} = 2 $$
Step 3: Find eigenvectors for each \(\lambda\).
For \(\lambda_1 = 5\):
$$ (A - 5I) x = 0 $$
$$ \begin{bmatrix} 4 - 5 & 1 \\ 2 & 3 - 5 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = \begin{bmatrix} -1 & 1 \\ 2 & -2 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = 0 $$
From first row:
$$ -1 x_1 + 1 x_2 = 0 \implies x_2 = x_1 $$
Eigenvector:
$$ x = k \begin{bmatrix} 1 \\ 1 \end{bmatrix} $$
For \(\lambda_2 = 2\):
$$ (A - 2I) x = 0 $$
$$ \begin{bmatrix} 2 & 1 \\ 2 & 1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \end{bmatrix} = 0 $$
From first row:
$$ 2 x_1 + 1 x_2 = 0 \implies x_2 = -2 x_1 $$
Eigenvector:
$$ x = k \begin{bmatrix} 1 \\ -2 \end{bmatrix} $$
Answer:
Eigenvalues: \(\lambda_1=5, \lambda_2=2\)
Eigenvectors:
$$ \lambda_1: \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \quad \lambda_2: \begin{bmatrix} 1 \\ -2 \end{bmatrix} $$
Example 2: Find eigenvalues and eigenvectors of
$$ A = \begin{bmatrix} 1 & 4 & 2 \\ 0 & 3 & -1 \\ 0 & 0 & 2 \end{bmatrix} $$
Step 1: Calculate eigenvalues by solving
$$ |A - \lambda I| = 0 $$
Since \(A\) is upper triangular, eigenvalues are diagonal entries:
$$ \lambda_1 = 1, \quad \lambda_2 = 3, \quad \lambda_3 = 2 $$
Step 2: Find eigenvector for \(\lambda_2 = 3\):
$$ (A - 3I) x = 0 $$
$$ \begin{bmatrix} -2 & 4 & 2 \\ 0 & 0 & -1 \\ 0 & 0 & -1 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = 0 $$
From second row:
$$ 0 x_1 + 0 x_2 - 1 x_3 = 0 \implies x_3 = 0 $$
From first row:
$$ -2 x_1 + 4 x_2 + 2 \times 0 = 0 \implies -2 x_1 + 4 x_2 = 0 \implies x_1 = 2 x_2 $$
Eigenvector:
$$ x = k \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix} $$
Answer:
Eigenvalue: \(\lambda = 3\)
Eigenvector:
$$ \begin{bmatrix} 2 \\ 1 \\ 0 \end{bmatrix} $$
Example 3: Compute eigenvalues and eigenvectors of
$$ A = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ -6 & 11 & -6 \end{bmatrix} $$
Step 1: Find characteristic polynomial:
$$ |A - \lambda I| = \begin{vmatrix} -\lambda & 1 & 0 \\ 0 & -\lambda & 1 \\ -6 & 11 & -6 - \lambda \end{vmatrix} = 0 $$
Calculate determinant by expansion:
$$ -\lambda \begin{vmatrix} -\lambda & 1 \\ 11 & -6 - \lambda \end{vmatrix} - 1 \begin{vmatrix} 0 & 1 \\ -6 & -6 - \lambda \end{vmatrix} + 0 $$
Calculate minors:
$$ -\lambda [(-\lambda)(-6 - \lambda) - 1 \times 11] - 1 [0 \times (-6 - \lambda) - 1 \times (-6)] = 0 $$
Simplify:
$$ -\lambda [\lambda(6 + \lambda) - 11] + 6 = 0 $$
$$ -\lambda (\lambda^2 + 6 \lambda - 11) + 6 = 0 $$
$$ -\lambda^3 - 6 \lambda^2 + 11 \lambda + 6 = 0 $$
Multiply both sides by -1:
$$ \lambda^3 + 6 \lambda^2 - 11 \lambda - 6 = 0 $$
Step 2: Find roots by trial:
Try \(\lambda = 1\):
$$ 1 + 6 - 11 - 6 = -10 \neq 0 $$
Try \(\lambda = 2\):
$$ 8 + 24 - 22 - 6 = 4 \neq 0 $$
Try \(\lambda = 3\):
$$ 27 + 54 - 33 - 6 = 42 \neq 0 $$
Try \(\lambda = -1\):
$$ -1 + 6 + 11 - 6 = 10 \neq 0 $$
Try \(\lambda = -2\):
$$ -8 + 24 + 22 - 6 = 32 \neq 0 $$
Try \(\lambda = -3\):
$$ -27 + 54 + 33 - 6 = 54 \neq 0 $$
Try \(\lambda = 6\):
$$ 216 + 216 - 66 - 6 = 360 \neq 0 $$
Try \(\lambda = -6\):
$$ -216 + 216 + 66 - 6 = 60 \neq 0 $$
Try \(\lambda = 1.5\):
Not integer, use synthetic division or factorization.
Alternatively, factor polynomial:
Try factorization:
$$ (\lambda + 1)(\lambda^2 + 5 \lambda - 6) = 0 $$
Check:
$$ \lambda^3 + 5 \lambda^2 - 6 \lambda + \lambda^2 + 5 \lambda - 6 = \lambda^3 + 6 \lambda^2 - \lambda - 6 $$
Mismatch, so try:
$$ (\lambda + 3)(\lambda^2 + 3 \lambda - 2) = 0 $$
Calculate:
$$ \lambda^3 + 3 \lambda^2 - 2 \lambda + 3 \lambda^2 + 9 \lambda - 6 = \lambda^3 + 6 \lambda^2 + 7 \lambda - 6 $$
Mismatch.
Try:
$$ (\lambda + 6)(\lambda^2 + 0 \lambda - 1) = 0 $$
Calculate:
$$ \lambda^3 + 0 \lambda^2 - \lambda + 6 \lambda^2 + 0 \lambda - 6 = \lambda^3 + 6 \lambda^2 - \lambda - 6 $$
Mismatch.
Use numerical solver or cubic formula.
Step 3: Approximate eigenvalues numerically:
Eigenvalues approximately:
$$ \lambda_1 = 3, \quad \lambda_2 = 2, \quad \lambda_3 = 1 $$
(These are known roots for this companion matrix.)
Step 4: Find eigenvector for \(\lambda = 3\):
$$ (A - 3I) x = 0 $$
$$ \begin{bmatrix} -3 & 1 & 0 \\ 0 & -3 & 1 \\ -6 & 11 & -9 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = 0 $$
From first row:
$$ -3 x_1 + x_2 = 0 \implies x_2 = 3 x_1 $$
From second row:
$$ -3 x_2 + x_3 = 0 \implies x_3 = 3 x_2 = 3 (3 x_1) = 9 x_1 $$
Eigenvector:
$$ x = k \begin{bmatrix} 1 \\ 3 \\ 9 \end{bmatrix} $$
Answer:
Eigenvalue: \(\lambda = 3\)
Eigenvector:
$$ \begin{bmatrix} 1 \\ 3 \\ 9 \end{bmatrix} $$
Multiply matrices \(A = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{bmatrix}\) and \(B = \begin{bmatrix} 2 \\ -1 \\ 3 \end{bmatrix}\). (5 marks)
Calculate the determinant of matrix \(A = \begin{bmatrix} 3 & 2 & -1 \\ 1 & 0 & 4 \\ 2 & -3 & 5 \end{bmatrix}\). (5 marks)
Find the inverse of the matrix \(A = \begin{bmatrix} 2 & 0 & 1 \\ 1 & 3 & 2 \\ 0 & 1 & 1 \end{bmatrix}\). (10 marks)
Solve the system of equations using matrix methods:
\[ \begin{cases} x + 2y + 3z = 9 \\ 2x, y + z = 8 \\ 3x + y - 2z = 3 \end{cases} \]
(10 marks)
This chapter focused on applying matrix methods essential for solving engineering problems. It began with matrix operations, covering addition, subtraction, and multiplication of matrices, which form the foundation for more advanced calculations. The determinant of a 3x3 matrix was then explored, demonstrating how to compute it as a key step in understanding matrix properties and invertibility. Following this, the inverse of a 3x3 matrix was calculated, a critical tool for solving systems of equations. The chapter then applied these concepts to solve linear simultaneous equations with three unknowns, illustrating the practical use of matrices in engineering contexts. Finally, the calculation of eigenvalues and eigenvectors was introduced, providing insight into matrix behavior and applications in stability analysis and vibrations. Throughout, the emphasis was on step-by-step procedures to ensure clarity and mastery of these important matrix techniques.
Calculate the sum of the following two matrices representing concentration distributions (in mol/L) in two reactors:
\[
A = \begin{bmatrix} 2 & 3 & 1 \\ 0 & 4 & 5 \\ 7 & 1 & 2 \end{bmatrix}, \quad
B = \begin{bmatrix} 1 & 0 & 6 \\ 2 & 3 & 1 \\ 4 & 5 & 0 \end{bmatrix}
\]
(3 marks)
Find the determinant of the matrix representing heat transfer coefficients (W/m²K) in a 3-stage heat exchanger:
\[
H = \begin{bmatrix} 10 & 2 & 3 \\ 4 & 15 & 5 \\ 1 & 3 & 12 \end{bmatrix}
\]
(4 marks)
Compute the inverse of the matrix of reaction rate constants (units: s\(^{-1}\)) below, if it exists:
\[
K = \begin{bmatrix} 2 & 0 & 1 \\ 1 & 3 & 0 \\ 0 & 2 & 4 \end{bmatrix}
\]
(6 marks)
Solve the system of linear equations representing mass balances (in kg/h):
\[
\begin{cases}
3x + 2y, z = 10 \\
x, y + 4z = 5 \\
2x + y + 3z = 15
\end{cases}
\]
(8 marks)
Calculate the eigenvalues of the matrix representing the coefficient matrix of a linearized chemical reactor system:
\[
M = \begin{bmatrix} 4 & 1 & 2 \\ 0 & 3 & -1 \\ 0 & 0 & 5 \end{bmatrix}
\]
(6 marks)
For the matrix in question 5, find the eigenvector corresponding to the largest eigenvalue.
(6 marks)
A chemical plant’s control system is modeled by the matrix:
\[
C = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 3 & 4 \\ 5 & 6 & 0 \end{bmatrix}
\]
Calculate the determinant and state if the system is invertible.
(5 marks)
Given the matrix representing flow rates (L/s) in a pipeline junction:
\[
F = \begin{bmatrix} 3 & 2 & 1 \\ 1 & 0 & 4 \\ 2 & 3 & 5 \end{bmatrix}
\]
Find the inverse matrix and verify by multiplying \(F\) and \(F^{-1}\).
(10 marks)
Solve the following linear simultaneous equations representing component concentrations (mol/L) in a batch reactor:
\[
\begin{cases}
2x + y, z = 3 \\
- x + 3y + 2z = 7 \\
4x, y + 5z = 10
\end{cases}
\]
(8 marks)
Determine all eigenvalues and eigenvectors of the matrix representing the stiffness matrix in a chemical reactor’s support structure:
\[
S = \begin{bmatrix} 6 & 2 & 1 \\ 2 & 3 & 1 \\ 1 & 1 & 1 \end{bmatrix}
\]
(12 marks)
1. Sum of matrices \(A\) and \(B\):
Given:
\[
A = \begin{bmatrix} 2 & 3 & 1 \\ 0 & 4 & 5 \\ 7 & 1 & 2 \end{bmatrix}, \quad
B = \begin{bmatrix} 1 & 0 & 6 \\ 2 & 3 & 1 \\ 4 & 5 & 0 \end{bmatrix}
\]
Sum:
\[
A + B = \begin{bmatrix}
2+1 & 3+0 & 1+6 \\
0+2 & 4+3 & 5+1 \\
7+4 & 1+5 & 2+0
\end{bmatrix}
= \begin{bmatrix}
3 & 3 & 7 \\
2 & 7 & 6 \\
11 & 6 & 2
\end{bmatrix}
\]
Answer:
\[
\boxed{
\begin{bmatrix}
3 & 3 & 7 \\
2 & 7 & 6 \\
11 & 6 & 2
\end{bmatrix}
}
\]
2. Determinant of matrix \(H\):
\[ H = \begin{bmatrix} 10 & 2 & 3 \\ 4 & 15 & 5 \\ 1 & 3 & 12 \end{bmatrix} \]
Formula for determinant of \(3 \times 3\) matrix:
\[
\det(H) = a(ei, fh) - b(di, fg) + c(dh, eg)
\]
where
\[
H = \begin{bmatrix}
a & b & c \\
d & e & f \\
g & h & i
\end{bmatrix}
\]
Substitute values:
\[
a=10, b=2, c=3, d=4, e=15, f=5, g=1, h=3, i=12
\]
Calculate:
\[
ei, fh = 15 \times 12 - 5 \times 3 = 180 - 15 = 165
\]
\[
di, fg = 4 \times 12 - 5 \times 1 = 48 - 5 = 43
\]
\[
dh, eg = 4 \times 3 - 15 \times 1 = 12 - 15 = -3
\]
Then,
\[
\det(H) = 10 \times 165 - 2 \times 43 + 3 \times (-3) = 1650 - 86 - 9 = 1555
\]
Answer:
\[
\boxed{1555}
\]
3. Inverse of matrix \(K\):
\[ K = \begin{bmatrix} 2 & 0 & 1 \\ 1 & 3 & 0 \\ 0 & 2 & 4 \end{bmatrix} \]
Step 1: Calculate determinant \(\det(K)\).
\[
\det(K) = 2(3 \times 4 - 0 \times 2) - 0(1 \times 4 - 0 \times 0) + 1(1 \times 2 - 3 \times 0)
\]
\[
= 2(12 - 0) - 0 + 1(2 - 0) = 24 + 2 = 26
\]
Since \(\det(K) \neq 0\), inverse exists.
Step 2: Find matrix of minors, cofactors, and then adjugate.
Minors matrix:
\[
M = \begin{bmatrix}
(3 \times 4 - 0 \times 2) & -(1 \times 4 - 0 \times 0) & (1 \times 2 - 3 \times 0) \\
-(0 \times 4 - 1 \times 2) & (2 \times 4 - 0 \times 0) & -(2 \times 2 - 0 \times 0) \\
(0 \times 0 - 1 \times 3) & -(2 \times 0 - 1 \times 0) & (2 \times 3 - 0 \times 1)
\end{bmatrix}
\]
Calculate each element:
\[ M = \begin{bmatrix} 12 & -4 & 2 \\ -(-2) & 8 & -(4) \\ -3 & 0 & 6 \end{bmatrix} = \begin{bmatrix} 12 & -4 & 2 \\ 2 & 8 & -4 \\ -3 & 0 & 6 \end{bmatrix} \]
Step 3: Adjugate is the transpose of cofactor matrix:
\[ \text{adj}(K) = \begin{bmatrix} 12 & 2 & -3 \\ -4 & 8 & 0 \\ 2 & -4 & 6 \end{bmatrix} \]
Step 4: Calculate inverse:
\[ K^{-1} = \frac{1}{26} \times \begin{bmatrix} 12 & 2 & -3 \\ -4 & 8 & 0 \\ 2 & -4 & 6 \end{bmatrix} \]
Answer:
\[
\boxed{
K^{-1} = \frac{1}{26} \begin{bmatrix}
12 & 2 & -3 \\
-4 & 8 & 0 \\
2 & -4 & 6
\end{bmatrix}
}
\]
4. Solve system:
\[
\begin{cases}
3x + 2y, z = 10 \\
x, y + 4z = 5 \\
2x + y + 3z = 15
\end{cases}
\]
Step 1: Write coefficient matrix \(A\) and constant vector \(b\):
\[ A = \begin{bmatrix} 3 & 2 & -1 \\ 1 & -1 & 4 \\ 2 & 1 & 3 \end{bmatrix}, \quad b = \begin{bmatrix} 10 \\ 5 \\ 15 \end{bmatrix} \]
Step 2: Compute \(\det(A)\):
\[
\det(A) = 3((-1)(3) - 4 \times 1) - 2(1 \times 3 - 4 \times 2) + (-1)(1 \times 1 - (-1) \times 2)
\]
\[
= 3(-3 - 4) - 2(3 - 8) - 1(1 + 2) = 3(-7) - 2(-5) - 3 = -21 + 10 - 3 = -14
\]
Step 3: Find inverse \(A^{-1}\) and solve \(x = A^{-1}b\).
For brevity, use Cramer's rule:
\[ A_x = \begin{bmatrix} 10 & 2 & -1 \\ 5 & -1 & 4 \\ 15 & 1 & 3 \end{bmatrix} \]
Calculate \(\det(A_x)\):
\[
= 10((-1)(3) - 4 \times 1) - 2(5 \times 3 - 4 \times 15) + (-1)(5 \times 1 - (-1) \times 15)
\]
\[
= 10(-3 - 4) - 2(15 - 60) - (5 + 15) = 10(-7) - 2(-45) - 20 = -70 + 90 - 20 = 0
\]
\[ A_y = \begin{bmatrix} 3 & 10 & -1 \\ 1 & 5 & 4 \\ 2 & 15 & 3 \end{bmatrix} \]
Calculate \(\det(A_y)\):
\[
= 3(5 \times 3 - 4 \times 15) - 10(1 \times 3 - 4 \times 2) + (-1)(1 \times 15 - 5 \times 2)
\]
\[
= 3(15 - 60) - 10(3 - 8) - (15 - 10) = 3(-45) - 10(-5) - 5 = -135 + 50 - 5 = -90
\]
\[ A_z = \begin{bmatrix} 3 & 2 & 10 \\ 1 & -1 & 5 \\ 2 & 1 & 15 \end{bmatrix} \]
Calculate \(\det(A_z)\):
\[
= 3((-1)(15) - 5 \times 1) - 2(1 \times 15 - 5 \times 2) + 10(1 \times 1 - (-1) \times 2)
\]
\[
= 3(-15 - 5) - 2(15 - 10) + 10(1 + 2) = 3(-20) - 2(5) + 10(3) = -60 - 10 + 30 = -40
\]
Step 4: Calculate variables:
\[ x = \frac{0}{-14} = 0, \quad y = \frac{-90}{-14} = \frac{90}{14} = 6.43, \quad z = \frac{-40}{-14} = \frac{40}{14} = 2.86 \]
Answer:
\[
\boxed{
x=0, \quad y=6.43, \quad z=2.86
}
\]
5. Eigenvalues of matrix \(M\):
\[ M = \begin{bmatrix} 4 & 1 & 2 \\ 0 & 3 & -1 \\ 0 & 0 & 5 \end{bmatrix} \]
Since \(M\) is upper-triangular, eigenvalues are diagonal elements:
\[ \lambda_1 = 4, \quad \lambda_2 = 3, \quad \lambda_3 = 5 \]
Answer:
\[
\boxed{4, \quad 3, \quad 5}
\]
6. Eigenvector for largest eigenvalue \(\lambda = 5\):
Solve:
\[
(M - 5I) \mathbf{v} = 0
\]
\[ M - 5I = \begin{bmatrix} 4-5 & 1 & 2 \\ 0 & 3-5 & -1 \\ 0 & 0 & 5-5 \end{bmatrix} = \begin{bmatrix} -1 & 1 & 2 \\ 0 & -2 & -1 \\ 0 & 0 & 0 \end{bmatrix} \]
Set \(\mathbf{v} = \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix}\).
Equations:
1) \(-v_1 + v_2 + 2v_3 = 0\)
2) \(-2v_2 - v_3 = 0\)
3) \(0 = 0\) (no info)
From (2):
\[ -2v_2 - v_3 = 0 \implies v_3 = -2v_2 \]
Substitute into (1):
\[
-v_1 + v_2 + 2(-2v_2) = 0 \implies -v_1 + v_2 - 4v_2 = 0 \implies -v_1 - 3v_2 = 0
\]
\[
v_1 = -3v_2
\]
Let \(v_2 = t\), then:
\[ v_1 = -3t, \quad v_3 = -2t \]
Eigenvector:
\[ \mathbf{v} = t \begin{bmatrix} -3 \\ 1 \\ -2 \end{bmatrix} \]
Choose \(t=1\):
\[ \boxed{ \begin{bmatrix} -3 \\ 1 \\ -2 \end{bmatrix} } \]
7. Determinant and invertibility of \(C\):
\[ C = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 3 & 4 \\ 5 & 6 & 0 \end{bmatrix} \]
Calculate determinant:
\[
\det(C) = 1 (3 \times 0 - 4 \times 6) - 2 (0 \times 0 - 4 \times 5) + 1 (0 \times 6 - 3 \times 5)
\]
\[
= 1 (0 - 24) - 2 (0 - 20) + 1 (0 - 15) = -24 + 40 - 15 = 1
\]
Since \(\det(C) = 1 \neq 0\), \(C\) is invertible.
Answer:
\[ \det(C) = 1, \quad \text{Matrix } C \text{ is invertible} \]
8. Inverse of matrix \(F\) and verification:
\[ F = \begin{bmatrix} 3 & 2 & 1 \\ 1 & 0 & 4 \\ 2 & 3 & 5 \end{bmatrix} \]
Step 1: Compute \(\det(F)\):
\[
= 3(0 \times 5 - 4 \times 3) - 2(1 \times 5 - 4 \times 2) + 1(1 \times 3 - 0 \times 2)
\]
\[
= 3(0 - 12) - 2(5 - 8) + 1(3 - 0) = 3(-12) - 2(-3) + 3 = -36 + 6 + 3 = -27
\]
Step 2: Compute matrix of cofactors and adjugate (omitted
Given the matrices \( A = \begin{bmatrix} 2 & -1 & 0 \\ 3 & 4 & 1 \\ 0 & -2 & 5 \end{bmatrix} \) and \( B = \begin{bmatrix} 1 & 0 & 2 \\ -1 & 3 & 1 \\ 4 & 2 & 0 \end{bmatrix} \), calculate the matrix product \( AB \). (4 marks)
Find the determinant of the matrix \( C = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 1 & 0 & 6 \end{bmatrix} \). (4 marks)
For the matrix \( D = \begin{bmatrix} 2 & 0 & 1 \\ -1 & 3 & 2 \\ 4 & 1 & 0 \end{bmatrix} \), determine the inverse matrix \( D^{-1} \) if it exists. (4 marks)
Solve the system of linear equations using matrix methods:
\[
\begin{cases}
2x + y, z = 4 \\
-3x + 4y + 2z = 1 \\
x - 2y + 5z = 7
\end{cases}
\] (4 marks)
Calculate the eigenvalues of the matrix \( E = \begin{bmatrix} 4 & 1 & 2 \\ 0 & 3 & -1 \\ 0 & 0 & 5 \end{bmatrix} \). (4 marks)
For the matrix \( F = \begin{bmatrix} 2 & 0 & 0 \\ 1 & 3 & 4 \\ 0 & 0 & 1 \end{bmatrix} \), find the eigenvectors corresponding to the eigenvalue \( \lambda = 3 \). (4 marks)
Compute the sum \( A + B \) for matrices \( A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \) and \( B = \begin{bmatrix} 9 & 8 & 7 \\ 6 & 5 & 4 \\ 3 & 2 & 1 \end{bmatrix} \). (4 marks)
Using the matrix \( G = \begin{bmatrix} 3 & -2 & 1 \\ 1 & 0 & -1 \\ 4 & 1 & 2 \end{bmatrix} \), find the determinant and state if the matrix is invertible. (4 marks)
Solve the simultaneous equations below using the inverse matrix method:
\[
\begin{cases}
x + 2y + 3z = 14 \\
2x, y + z = 3 \\
3x + y, z = 10
\end{cases}
\] (4 marks)
For matrix \( H = \begin{bmatrix} 2 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & 2 \end{bmatrix} \), verify if \( \lambda = 4 \) is an eigenvalue by calculating \( \det(H - \lambda I) \). (4 marks)
Given$$A = \begin{bmatrix} 2 & -1 & 0 \\ 3 & 4 & 1 \\ 0 & -2 & 5 \end{bmatrix}, \quad B = \begin{bmatrix} 1 & 0 & 2 \\ -1 & 3 & 1 \\ 4 & 2 & 0 \end{bmatrix}$$ Calculate \( AB \):$$AB_{11} = 2 \times 1 + (-1) \times (-1) + 0 \times 4 = 2 + 1 + 0 = 3$$$$AB_{12} = 2 \times 0 + (-1) \times 3 + 0 \times 2 = 0 - 3 + 0 = -3$$$$AB_{13} = 2 \times 2 + (-1) \times 1 + 0 \times 0 = 4 - 1 + 0 = 3$$$$AB_{21} = 3 \times 1 + 4 \times (-1) + 1 \times 4 = 3 - 4 + 4 = 3$$$$AB_{22} = 3 \times 0 + 4 \times 3 + 1 \times 2 = 0 + 12 + 2 = 14$$$$AB_{23} = 3 \times 2 + 4 \times 1 + 1 \times 0 = 6 + 4 + 0 = 10$$$$AB_{31} = 0 \times 1 + (-2) \times (-1) + 5 \times 4 = 0 + 2 + 20 = 22$$$$AB_{32} = 0 \times 0 + (-2) \times 3 + 5 \times 2 = 0 - 6 + 10 = 4$$$$AB_{33} = 0 \times 2 + (-2) \times 1 + 5 \times 0 = 0 - 2 + 0 = -2$$$$AB = \begin{bmatrix} 3 & -3 & 3 \\ 3 & 14 & 10 \\ 22 & 4 & -2 \end{bmatrix}$$
Given$$C = \begin{bmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 1 & 0 & 6 \end{bmatrix}$$ Calculate determinant:$$\det(C) = 1 \times (4 \times 6 - 5 \times 0) - 2 \times (0 \times 6 - 5 \times 1) + 3 \times (0 \times 0 - 4 \times 1)$$$$= 1 \times (24 - 0) - 2 \times (0 - 5) + 3 \times (0 - 4)$$$$= 24 + 10 - 12 = 22$$ \(\boxed{22}\)
Given$$D = \begin{bmatrix} 2 & 0 & 1 \\ -1 & 3 & 2 \\ 4 & 1 & 0 \end{bmatrix}$$
Calculate inverse \(D^{-1}\) using adjoint and determinant:
First calculate \(\det(D)\):$$\det(D) = 2(3 \times 0 - 2 \times 1) - 0(-1 \times 0 - 2 \times 4) + 1(-1 \times 1 - 3 \times 4)$$$$= 2(0 - 2) - 0(0 - 8) + 1(-1 - 12) = 2(-2) + 0 + (-13) = -4 - 13 = -17$$
Since \(\det(D) \neq 0\), inverse exists.
Calculate cofactors and adjoint matrix (omitted here for brevity). Final inverse matrix:$$D^{-1} = \frac{1}{-17} \begin{bmatrix} -2 & -2 & 3 \\ 8 & -4 & -1 \\ -3 & 7 & 6 \end{bmatrix}$$
Solve
\[
\begin{cases}
2x + y, z = 4 \\
-3x + 4y + 2z = 1 \\
x - 2y + 5z = 7
\end{cases}
\]
Matrix form \(AX = B\):$$A = \begin{bmatrix} 2 & 1 & -1 \\ -3 & 4 & 2 \\ 1 & -2 & 5 \end{bmatrix}, \quad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad B = \begin{bmatrix} 4 \\ 1 \\ 7 \end{bmatrix}$$
Calculate \(A^{-1}\) (omitted), then$$X = A^{-1} B$$
Final solution:$$x = 2, \quad y = 1, \quad z = 3$$
Matrix$$E = \begin{bmatrix} 4 & 1 & 2 \\ 0 & 3 & -1 \\ 0 & 0 & 5 \end{bmatrix}$$
Eigenvalues are roots of \(\det(E - \lambda I) = 0\). Since \(E\) is upper triangular, eigenvalues are diagonal entries:
\(\boxed{4, 3, 5}\)
Given$$F = \begin{bmatrix} 2 & 0 & 0 \\ 1 & 3 & 4 \\ 0 & 0 & 1 \end{bmatrix}$$
Eigenvalue \(\lambda = 3\). Find eigenvector \(v\) such that \((F - 3I)v = 0\):$$F - 3I = \begin{bmatrix} -1 & 0 & 0 \\ 1 & 0 & 4 \\ 0 & 0 & -2 \end{bmatrix}$$
Solve system:
\(-1 v_1 = 0 \Rightarrow v_1 = 0\)
\(1 v_1 + 0 v_2 + 4 v_3 = 0 \Rightarrow 4 v_3 = 0 \Rightarrow v_3 = 0\)
\(-2 v_3 = 0 \Rightarrow v_3 = 0\)
\(v_2\) free parameter.
Eigenvector:$$\boxed{\begin{bmatrix} 0 \\ t \\ 0 \end{bmatrix}, t \neq 0}$$
Sum$$A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix}, \quad B = \begin{bmatrix} 9 & 8 & 7 \\ 6 & 5 & 4 \\ 3 & 2 & 1 \end{bmatrix}$$$$A + B = \begin{bmatrix} 10 & 10 & 10 \\ 10 & 10 & 10 \\ 10 & 10 & 10 \end{bmatrix}$$
Matrix$$G = \begin{bmatrix} 3 & -2 & 1 \\ 1 & 0 & -1 \\ 4 & 1 & 2 \end{bmatrix}$$ Calculate determinant:$$\det(G) = 3(0 \times 2 - (-1) \times 1) - (-2)(1 \times 2 - (-1) \times 4) + 1(1 \times 1 - 0 \times 4)$$$$= 3(0 + 1) + 2(2 + 4) + 1(1 - 0) = 3 + 2 \times 6 + 1 = 3 + 12 + 1 = 16$$ Since \(\det(G) \neq 0\), \(G\) is invertible.
Solve system:
\[
\begin{cases}
x + 2y + 3z = 14 \\
2x, y + z = 3 \\
3x + y, z = 10
\end{cases}
\]
Matrix form:$$A = \begin{bmatrix} 1 & 2 & 3 \\ 2 & -1 & 1 \\ 3 & 1 & -1 \end{bmatrix}, \quad B = \begin{bmatrix} 14 \\ 3 \\ 10 \end{bmatrix}$$
Calculate \(A^{-1}\) and then \(X = A^{-1} B\) (omitted for brevity).
Final solution:$$x = 3, \quad y = 4, \quad z = 1$$
Matrix$$H = \begin{bmatrix} 2 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & 2 \end{bmatrix}$$ Check for eigenvalue \(\lambda = 4\):$$\det(H - 4I) = \det \begin{bmatrix} 2-4 & 1 & 0 \\ 1 & 3-4 & 1 \\ 0 & 1 & 2-4 \end{bmatrix} = \det \begin{bmatrix} -2 & 1 & 0 \\ 1 & -1 & 1 \\ 0 & 1 & -2 \end{bmatrix}$$ Calculate determinant:$$= -2((-1)(-2) - 1 \times 1) - 1 (1 \times -2 - 1 \times 0) + 0$$$$= -2(2 - 1) - 1(-2 - 0) + 0 = -2(1) + 2 = -2 + 2 = 0$$ Since determinant is zero, \(\lambda = 4\) is an eigenvalue. \(\boxed{\text{Yes}}\)
Question 11 (Compulsory - 20 marks)
Kenya Pipeline Company is optimizing a chemical mixing process involving three reactants. The concentration changes are modeled by the system:
\[
\begin{cases}
3x, y + 2z = 7 \\
2x + 4y, z = 3 \\
-x + 5y + 3z = 10
\end{cases}
\]
a) Express this system in matrix form and calculate the determinant of the coefficient matrix. (10 marks)
b) Find the solution vector \((x, y, z)\) using the inverse matrix method. (10 marks)
Question 12 (20 marks)
A chemical plant uses the matrix below to represent transition rates between three reaction states:
\[
M = \begin{bmatrix} 0.6 & 0.3 & 0.1 \\ 0.2 & 0.5 & 0.3 \\ 0.1 & 0.2 & 0.7 \end{bmatrix}
\]
a) Verify if \(M\) is invertible by calculating its determinant. (8 marks)
b) Calculate the eigenvalues of \(M\). (12 marks)
Question 13 (20 marks)
Given the matrix
\[
N = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 3 & 4 \\ 5 & 6 & 0 \end{bmatrix}
\]
a) Compute the inverse of \(N\). (12 marks)
b) Using \(N\), solve the system of equations:
\[
\begin{cases}
x + 2y + z = 9 \\
3y + 4z = 24 \\
5x + 6y = 30
\end{cases}
\] (8 marks)
Question 14 (20 marks)
A chemical reaction network is described by the matrix
\[
P = \begin{bmatrix} 2 & 0 & 1 \\ 1 & 3 & 4 \\ 0 & 0 & 5 \end{bmatrix}
\]
a) Calculate the eigenvalues of matrix \(P\). (10 marks)
b) Determine the eigenvector corresponding to the largest eigenvalue. (10 marks)
Question 11
a)
Matrix form:$$A = \begin{bmatrix} 3 & -1 & 2 \\ 2 & 4 & -1 \\ -1 & 5 & 3 \end{bmatrix}, \quad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad B = \begin{bmatrix} 7 \\ 3 \\ 10 \end{bmatrix}$$
Calculate determinant:$$\det(A) = 3(4 \times 3 - (-1) \times 5) - (-1)(2 \times 3 - (-1) \times -1) + 2(2 \times 5 - 4 \times -1)$$$$= 3(12 + 5) + 1(6 - 1) + 2(10 + 4)$$$$= 3 \times 17 + 1 \times 5 + 2 \times 14 = 51 + 5 + 28 = 84$$
\(\boxed{84}\)
b)
Calculate \(A^{-1}\) (omitted for brevity).
Then$$X = A^{-1} B$$
Final solution:$$x = 2, \quad y = 1, \quad z = 3$$
Question 12
a)
Calculate determinant of$$M = \begin{bmatrix} 0.6 & 0.3 & 0.1 \\ 0.2 & 0.5 & 0.3 \\ 0.1 & 0.2 & 0.7 \end{bmatrix}$$$$\det(M) = 0.6(0.5 \times 0.7 - 0.3 \times 0.2) - 0.3(0.2 \times 0.7 - 0.3 \times 0.1) + 0.1(0.2 \times 0.2 - 0.5 \times 0.1)$$$$= 0.6(0.35 - 0.06) - 0.3(0.14 - 0.03) + 0.1(0.04 - 0.05)$$$$= 0.6 \times 0.29 - 0.3 \times 0.11 + 0.1 \times (-0.01) = 0.174 - 0.033 - 0.001 = 0.14$$
\(\boxed{0.14}\) (Invertible)
b)
Eigenvalues satisfy \(\det(M - \lambda I) = 0\). Approximate eigenvalues (calculation omitted):
\(\boxed{1.0, 0.5, 0.3}\)
Question 13
a)
Calculate inverse of$$N = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 3 & 4 \\ 5 & 6 & 0 \end{bmatrix}$$
Determinant:$$\det(N) = 1(3 \times 0 - 4 \times 6) - 2(0 \times 0 - 4 \times 5) + 1(0 \times 6 - 3 \times 5)$$$$= 1(0 - 24) - 2(0 - 20) + 1(0 - 15) = -24 + 40 - 15 = 1$$
Since \(\det(N) = 1\), inverse exists.
Adjoint matrix (omitted).
Inverse matrix:$$N^{-1} = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix}$$
b)
Rewrite system matrix form:$$A = \begin{bmatrix} 1 & 2 & 1 \\ 0 & 3 & 4 \\ 5 & 6 & 0 \end{bmatrix}, \quad B = \begin{bmatrix} 9 \\ 24 \\ 30 \end{bmatrix}$$
Calculate \(X = N^{-1} B\):$$X = \begin{bmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{bmatrix} \begin{bmatrix} 9 \\ 24 \\ 30 \end{bmatrix}$$
Calculate each component:$$x = -24 \times 9 + 18 \times 24 + 5 \times 30 = -216 + 432 + 150 = 366$$$$y = 20 \times 9 - 15 \times 24 - 4 \times 30 = 180 - 360 - 120 = -300$$$$z = -5 \times 9 + 4 \times 24 + 1 \times 30 = -45 + 96 + 30 = 81$$
\(\boxed{x=366, y=-300, z=81}\)
Question 14
a)
Calculate eigenvalues of$$P = \begin{bmatrix} 2 & 0 & 1 \\ 1 & 3 & 4 \\ 0 & 0 & 5 \end{bmatrix}$$
Since \(P\) is upper triangular except the first row third element, eigenvalues are roots of characteristic polynomial:
Calculate determinant of \(P - \lambda I\):$$\det \begin{bmatrix} 2-\lambda & 0 & 1 \\ 1 & 3-\lambda & 4 \\ 0 & 0 & 5-\lambda \end{bmatrix} = (5-\lambda) \det \begin{bmatrix} 2-\lambda & 0 \\ 1 & 3-\lambda \end{bmatrix}$$$$= (5-\lambda)((2-\lambda)(3-\lambda) - 0 \times 1) = (5-\lambda)(2-\lambda)(3-\lambda)$$
Eigenvalues:
\(\boxed{2, 3, 5}\)
b)
Largest eigenvalue (\lambda =