46. Linear Equations

46.1. Solving Systems of Linear Equations

Linear Equation

  1. Consistency

Whether a system of linear equations has at least one solution

Example

Consistent System

This system has a unique solution

Inconsistent System

This system is inconsistent (equations contradict each other, no solution can satisfy both)

  1. Independence

Whether the equations in the system provide unique and non-redundant information about the variables

Example

Independent Equations

Neither equation can be derived from the other (they provide unique information and intersect at a single point)

Dependent Equations

Second equation is just a multiple of the first equation (they describe the same line)

  1. Recognizing Systems with No Solution or Infinite Solutions
Example

Unique Solution (Consistent and Independent):

No Solution (Inconsistent):

Infinitely Many Solutions (Consistent and Dependent):

  1. Matrix Representation

System of Equations

Matrix Representation

Coefficient vector ()

Variable vector ()

Constant vector ()

Matrix equation

linear_eq.py
from scipy.linalg import solve

X = np.array([
  [1, 1, 1],
  [2, -1, 3],
  [3, 4, -1]
])

Y = np.array([6, 14, 1])

intersection_point = solve(X, Y)