2.1 Systems of Linear Equations
Systems of linear equations are fundamental in linear algebra, as many problems can be formulated in this way. Linear algebra provides the tools to solve these systems efficiently.
Example 2.10 A company produces products \(N_1, \ldots, N_n\) using resources \(R_1, \ldots, R_m\). Each product \(N_j\) requires \(a_{ij}\) units of resource \(R_i\). If \(b_i\) units of each resource \(R_i\) are available, then the total resources used must satisfy
\[ a_{i1}x_1 + a_{i2}x_2 + \cdots + a_{in}x_n = b_i, \quad i = 1, \ldots, m \]
or, in general matrix form,
\[ A\mathbf{x} = \mathbf{b}, \]
where \(A = [a_{ij}] \in \mathbb{R}^{m \times n}\), \(\mathbf{x} \in \mathbb{R}^n\), and \(\mathbf{b} \in \mathbb{R}^m\).
Example 2.11 Suppose a factory produces two products: P1 and P2.
Let:
- \(x_1\) = units of P1 produced
- \(x_2\) = units of P2 produced
Constraints:
- Labor: Each unit of P1 requires 2 hours, P2 requires 3 hours, and total available labor is 120 hours:
\[ 2x_1 + 3x_2 \leq 120 \]
- Material: Each unit of P1 uses 1 kg of material, P2 uses 2 kg, and total available material is 100 kg:
\[ 1x_1 + 2x_2 \leq 100 \]
- Non-negativity:
\[ x_1 \geq 0, \quad x_2 \geq 0 \]
We can rewrite the inequalities as a matrix inequality: \[ \underbrace{ \begin{pmatrix} 2 & 3 \\ 1 & 2 \end{pmatrix}}_{A} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix} \leq \underbrace{ \begin{pmatrix} 120 \\ 100 \end{pmatrix}}_{b} \]
Here:
- \(\mathbf{A}\) is the constraint matrix.
- \(x = \begin{pmatrix}x_1 \\ x_2\end{pmatrix}\) is the decision variable vector.
- \(b\) is the resource vector.
2.1.1 Solutions to Systems of Linear Equations
In general, a system of linear equations can have:
- no solution,
- exactly one solution, or
- infinitely many solutions.
Example 2.12 The system \[ \begin{aligned} x_1 + x_2 + x_3 &= 3 \\ x_1 - x_2 + 2x_3 &= 2 \\ 2x_1 + 3x_3 &= 1 \end{aligned} \] has no solution, since combining the first two equations gives \(2x_1 + 3x_3 = 5\), which contradicts the third equation.
Systems of equations with no solutions are called inconsistent.
Definition 2.7 A system of linear equations is said to be inconsistent if no set of values for the unknown variables satisfies all equations simultaneously.
In other words, the equations contradict each other, and there is no common solution.
Example 2.13 The system \[ \begin{aligned} x_1 + x_2 + x_3 &= 3 \\ x_1 - x_2 + 2x_3 &= 2 \\ x_2 + x_3 &= 2 \end{aligned} \] has a unique solution \((x_1, x_2, x_3) = (1, 1, 1)\).
Example 2.14 The system
\[
\begin{aligned}
x_1 + x_2 + x_3 &= 3 \\
x_1 - x_2 + 2x_3 &= 2 \\
2x_1 + 3x_3 &= 5
\end{aligned}
\]
has infinitely many solutions, since the third equation is a linear combination of the first two.
If we set \(x_3 = a \in \mathbb{R}\), then
\[
(x_1, x_2, x_3) =
\left( \tfrac{5}{2} - \tfrac{3}{2}a,\,
\tfrac{1}{2} + \tfrac{1}{2}a,\,
a \right),
\quad a \in \mathbb{R}.
\]
Hence, the solution set forms a line in \(\mathbb{R}^3\).
Definition 2.8 A system of linear equations is called consistent if there exists at least one set of values for the unknown variables that satisfies all equations simultaneously.
- If there is exactly one solution, the system is uniquely consistent.
- If there are infinitely many solutions, the system is dependent (still consistent).
Example 2.15 The system of equations\[ \begin{cases} x + y = 5 \\ 2x - y = 1 \end{cases} \] is a consistent system with a unique solution: \(x = 2\), \(y = 3\).
Example 2.16 The system of equations \[ \begin{cases} x + y = 4 \\ 2x + 2y = 10 \end{cases} \] is inconsistent since the second equation is equivalent to \(x + y = 5\), which contradicts the first equation (\(x + y = 4\)). Thus, the system has no solution.
2.1.2 Geometric Interpretation
In two dimensions, each linear equation represents a line on the \(x_1x_2\)-plane. The solution set is the intersection of these lines, which can be:
- a point (unique solution),
- a line (infinitely many solutions), or
- empty (no solution).
For three variables, each equation defines a plane in \(\mathbb{R}^3\). Their intersection can be a plane, line, point, or empty set.
Example 2.17 \[ \begin{aligned} 4x_1 + 4x_2 &= 5 \\ 2x_1 - 4x_2 &= 1 \end{aligned} \] has the unique solution \((x_1, x_2) = (1, \tfrac{1}{4})\).
Example 2.18 Consider the system: \[ \begin{cases} x + y + z = 3 \\ 2x + 2y + 2z = 6 \\ x - y + z = 1 \end{cases} \] The second equation is just \(2 \times\) the first equation, so it doesn’t add a new constraint. The first and third equations define a plane intersection. This leaves one free variable, so there are infinitely many solutions.
Let \(z = t\) (free parameter), then: \[ \begin{aligned} x + y + t &= 3 \implies x = 3 - y - t \\ x - y + t &= 1 \implies (3 - y - t) - y + t = 1 \implies 2y = 2 \implies y = 1 \\ x &= 3 - 1 - t = 2 - t \end{aligned} \] Thus, the general solution is: \[ (x, y, z) = (2 - t, 1, t), \quad t \in \mathbb{R}. \]
2.1.3 Matrix Formulation
A system of linear equations can be written compactly as:
\[ \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix} \begin{bmatrix} x_1 \\ \vdots \\ x_n \end{bmatrix} = \begin{bmatrix} b_1 \\ \vdots \\ b_m \end{bmatrix} \]
This matrix representation \(\mathbf{A}\mathbf{x} = \mathbf{b}\) provides a compact and powerful way to describe and solve systems of linear equations.
Example 2.19 Write the system of equations as a matrix: \[ \begin{cases} x + y = 5 \\ 2x - y = 1 \end{cases} \]
The matrix version of this system is: \[ \begin{bmatrix} 1 & 1 \\ 2 & -1 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 5 \\ 1 \end{bmatrix} \]
Example 2.20 Write the system of equations as a matrix: \[\begin{cases} x + y = 4 \\ 2x + 2y = 10 \end{cases} \]
The matrix version of this system is: \[ \begin{bmatrix} 1 & 1 \\ 2 & 2 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 4 \\ 10 \end{bmatrix} \]
Exercises
Exercise 2.8 Write a system of equations with a unique solution.
Exercise 2.9 Write a system of equations with infinitely many solutions.
Exercise 2.10 Write a system of equations with no solutions.
Exercise 2.11 Solve example 2.11
Exercise 2.12 Write 2.15 and 2.16 as a matrix equations
Exercise 2.13 Solve a system of equations
Exercise 2.14 Solve a system of equations
Exercise 2.15 Turn into a matrix form
Exercise 2.16 Change from matrix to equations