Linear Equations We will start with some examples. Examples: 3x - 2y = 1 This is linear because both x and y are only raised to a power of 1 . That is, 3x^1 + 2y^1 = 1 On the other hand, 3x^2 - 2y^2 + 5xy = 3 is not linear since x and y are raised to 2 and there is a mixed term xy . x - 2y + 3xy = 0 is not linear because we have a mixed term \( xy \). e^{2x} - e^y = 3 Not linear because x and y are in the exponent. In fact, they are exponential. - Equations without any other functions of variables, if the equation is purely the variables raised to the power 1 , we call it a linear equation. - Linear equations are the simplest category of equations. - Linear equations represent lines or planes in space. Systems of Linear Equations Example: \begin{align*} 2x - 3y &= 5 \\ x + 2y &= 7 \end{align*} This is a system of 2 linear equations in 2 variables x and y . Example: \begin{align*} x_1 - 2x_2 - 5x_3 + 7x_4 &= 11 \\ 2x_1 + x_2 + 3x_3 - x_4 &= 5 \\ x_1 + 5x_2 + x_3 - 2x_4 &= 9 \end{align*} This is a system of 3 linear equations in 4 variables x_1, x_2, x_3, x_4 . Sometimes, the equations can be quite complex. Some systems may have no solutions , exactly one solution , or infinitely many solutions . Examples (No Solutions) 1. \begin{align*} 2x - y &= 3 \\ 2x - y &= 4 \end{align*} This system of equations implies that \(2x - y\) is equal to two different numbers, which not possible. So this system has no solutions, or we call it inconsistent. 2. \begin{align*} 3x_1 - 5x_2 + x_3 &= 3 \\ x_1 + 2x_2 - 3x_3 &= 7 \\ 4x_1 - 3x_2 - 2x_3 &= 4 \end{align*} This system is also not consistent; to see why, add the first two equations. We get, 4x_1 - 3x_2 - 2x_3 = 10 which is inconsistent with the third equation. So, no solutions exist since the sum of the first two equations and the last equation is inconsistent. Determining inconsistencies in systems of equations could become quite complicated, as we can see from this example. We plan to unravel these complications later on. Example (Exactly one solution) \begin{align*} 2x_1 - 3x_2 &= 2 \\ x_1 + 3x_2 &= 1 \end{align*} Add the two equations, so we get: 3x_1 = 3 \implies x_1 = 1 Substitute x_1 = 1 into the second equation: 1 + 3x_2 = 1 \implies x_2 = 0 So we have exactly one solution: (x_1, x_2) = (1, 0) Example (Infinitely many solutions) \begin{align*} 2x - y &= -3 \\ 4x - 2y &= -6 \end{align*} Although two equations, the second equation in disguise, is twice the first. So effectively, the system has just one equation. There are many solutions: (0, 3), (1, 5), (2, 7), \ldots More generally: (a, 2a + 3) You can pick any number for a , then you get a corresponding (x,y) value pair. So, there are infinitely many solutions. Writing Systems of Linear Equations in Matrices Example: \begin{align*} x_1 - 2x_2 + 3x_3 &= 7 \\ 2x_1 + x_2 - 4x_3 &= 9 \\ 5x_1 - 2x_2 + 3x_3 &= 16 \\ -3x_1 - 5x_3 &= 10 \end{align*} To represent this system in matrix form, we can write: \begin{bmatrix} 1 & -2 & 3 \\ 2 & 1 & -4 \\ 5 & -2 & 3 \\ -3 & 0 & -5 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 7 \\ 9 \\ 16 \\ 10 \end{bmatrix} A \cdot x = b \quad \text{- Matrix form of a system of equations} Matrix A is 4 \times 3 : - Number of equations: 4 - Number of variables: 3 Vector x is 3 \times 1 : - Number of variables: 3 Vector b is 4 \times 1 : - Number of equations: 4 Example: Matrix equations Given the system of equations, write it down as a matrix equation. \begin{align*} x_1 + 2x_2 - x_3 &= 1 \\ 2x_1 - x_2 + x_3 &= 3 \\ -x_1 + 2x_2 + 3x_3 &= 7 \end{align*} The matrices A and b are defined as: A = \begin{bmatrix} 1 & 2 & -1 \\ 2 & -1 & 1 \\ -1 & 2 & 3 \end{bmatrix}, \quad b = \begin{bmatrix} 1 \\ 3 \\ 7 \end{bmatrix}