This notebook contains an excerpt from the Python Programming and Numerical Methods - A Guide for Engineers and Scientists, the content is also available at Berkeley Python Numerical Methods.
The copyright of the book belongs to Elsevier. We also have this interactive book online for a better learning experience. The code is released under the MIT license. If you find this content useful, please consider supporting the work on Elsevier or Amazon!
< 14.2 Linear Transformations | Contents | 14.4 Solutions to Systems of Linear Equations >
Systems of Linear Equations¶
A \(\textbf{linear equation}\) is an equality of the form $\( \sum_{i = 1}^{n} (a_i x_i) = y, \)\( where \)a_i\( are scalars, \)x_i\( are unknown variables in \)\mathbb{R}\(, and \)y$ is a scalar.
TRY IT! Determine which of the following equations is linear and which is not. For the ones that are not linear, can you manipulate them so that they are?
\(3x_1 + 4x_2 - 3 = -5x_3\)
\(\frac{-x_1 + x_2}{x_3} = 2\)
\(x_1x_2 + x_3 = 5\)
Equation 1 can be rearranged to be \(3x_1 + 4x_2 + 5x_3= 3\), which clearly has the form of a linear equation. Equation 2 is not linear but can be rearranged to be \(-x_1 + x_2 - 2x_3 = 0\), which is linear. Equation 3 is not linear.
A \(\textbf{system of linear equations}\) is a set of linear equations that share the same variables. Consider the following system of linear equations:
where \(a_{i,j}\) and \(y_i\) are real numbers. The \(\textbf{matrix form}\) of a system of linear equations is \(\textbf{\)Ax = y\(}\) where \(A\) is a \({m} \times {n}\) matrix, \(A(i,j) = a_{i,j}, y\) is a vector in \({\mathbb{R}}^m\), and \(x\) is an unknown vector in \({\mathbb{R}}^n\). The matrix form is showing as below:
If you carry out the matrix multiplication, you will see that you arrive back at the original system of equations.
TRY IT! Put the following system of equations into matrix form.
< 14.2 Linear Transformations | Contents | 14.4 Solutions to Systems of Linear Equations >