Linear Equations in Linear Algebra
1. System of Linear Equations
A system of linear equations consists of two or more linear equations involving the same set of variables. A solution to the system is a set of values for the variables that satisfy all equations simultaneously.
General Form
A system of \(m\) linear equations in \(n\) variables can be written as:
where:
- \(a_{ij}\) are the coefficients of the variables \(x_1, x_2, \ldots, x_n\).
- \(b_i\) are the constants.
Example
Solve the system of equations:
Solution
- Multiply the second equation by 3 to eliminate \(y\):
- Add to the first equation:
- Substitute \(x = 1\) into the first equation:
Thus, the solution is \(x = 1, y = 2\).
2. Row Reduction and Echelon Forms
Row reduction transforms a matrix into a simpler form to solve linear systems. The two key forms are:
Row Echelon Form (REF)
- Each leading entry in a row is to the right of the leading entry in the row above.
- All entries below a leading entry are zero.
Reduced Row Echelon Form (RREF)
- The matrix is in REF.
- Each leading entry is 1.
- Each leading 1 is the only nonzero entry in its column.
Steps for Gaussian Elimination
- Write the augmented matrix of the system.
- Use row operations to achieve REF.
- (Optional) Continue to RREF for simplicity.
Example
Solve the system:
Augmented Matrix:
Perform row reduction to solve:
Solution: \(x = 1, y = 2, z = -1\).
3. Vector Equations
A vector equation is an equation involving vectors and their linear combinations.
General Form
Example
Given:
Find scalars \(c_1\) and \(c_2\) such that:
Write as a system:
Solve using row reduction or substitution to find \(c_1\) and \(c_2\).
4. The Matrix Equation \(A\mathbf{x} = \mathbf{b}\)
The matrix equation represents a system of linear equations compactly:
where:
- \(A\) is the coefficient matrix.
- \(\mathbf{x}\) is the vector of variables.
- \(\mathbf{b}\) is the vector of constants.
Example
Solve using matrix operations:
5. Applications of Linear Systems
- Physics: Modeling forces and motion.
- Economics: Solving input-output models.
- Computer Graphics: Transformations and projections.
- Engineering: Circuit analysis.
6. Linear Independence
Vectors \(\mathbf{v}_1, \mathbf{v}_2, \ldots, \mathbf{v}_n\) are linearly independent if the only solution to:
is \(c_1 = c_2 = \cdots = c_n = 0\).
Example
Are the vectors:
linearly independent?
Solution:
Results in \(c_1 = 0, c_2 = 0\). Hence, the vectors are independent.
Code Example
import numpy as np
# Solve Ax = b
A = np.array([[1, 2], [3, 4]])
b = np.array([5, 6])
x = np.linalg.solve(A, b)
print("Solution:", x)
Solution: [-4. 4.5]