Solving Systems of Linear Equations Notes

Recap of Week 1

  • Coordinate Geometry: Studied the properties of straight lines.
  • Straight Lines: Explored equations and characteristics of linear graphs.
  • Quadratics:
    • Explored parabolas and their standard forms.
    • Reviewed quadratic equations and methods for solving them.

Introduction to Solving Systems of Linear Equations

  • Core Concept: A system of linear equations involves multiple equations with multiple variables (unknowns) that must be satisfied simultaneously.
  • Notation:
    • Two variables: a1x+b1y=c1a_1x + b_1y = c_1 and a2x+b2y=c2a_2x + b_2y = c_2.
    • General form (mm equations, nn variables): am1x1+am2x2++amnxn=bma_{m1}x_1 + a_{m2}x_2 + \dots + a_{mn}x_n = b_m.
  • Applications:
    • Circuits: Used to solve for voltages and currents using Kirchhoff's Laws.
    • Web Search: The PageRank algorithm uses systems of linear equations to determine the importance of webpages.
    • Polynomial Fit: Determining coefficients (a,b,c,d,ea, b, c, d, e) for a curve passing through specific data points like (1.0,0.5)(1.0, 0.5), (2.0,2.0)(2.0, 2.0), and (3.0,1.5)(3.0, 1.5).

Case Study: Web Search - PageRank

  • Setup: Consider 5 webpages labeled x0,x1,x2,x3,x4x_0, x_1, x_2, x_3, x_4.
  • Principles of Importance:
    • An arrow from Page A to Page B means "Page A gives importance to Page B."
    • Each page divides its importance equally among its outgoing links.
  • Mathematical Representation:
    • x0=x33x_0 = \frac{x_3}{3} (Page 0 receives 13\frac{1}{3} of Page 3's importance).
    • x1=x0+x33x_1 = x_0 + \frac{x_3}{3} (Page 1 receives all of Page 0's importance and 13\frac{1}{3} of Page 3's).
    • x2=x12x_2 = \frac{x_1}{2} (Page 2 receives half of Page 1's importance).
    • x3=x12+x22+x4x_3 = \frac{x_1}{2} + \frac{x_2}{2} + x_4.
    • x4=x22+x33x_4 = \frac{x_2}{2} + \frac{x_3}{3}.
  • System Matrix: These equations are rearranged to equal zero to form a matrix for solving (e.g., 1x0+0x1+0x2+13x3+0x4=0-1x_0 + 0x_1 + 0x_2 + \frac{1}{3}x_3 + 0x_4 = 0).

Two Linear Equations in Two Variables

  • Standard Form:
    • a1x+b1y=c1a_1x + b_1y = c_1
    • a2x+b2y=c2a_2x + b_2y = c_2
  • Views of the Problem:
    1. Graphical View: Each equation represents a straight line. The solution is the point of intersection.
    2. Algebraic View: Using the elimination method to isolate one variable.
    3. Matrix-Vector View: A prelude to linear algebra where coefficients are organized in a grid.
  • Types of Solutions (Graphical):
    1. Intersect at one point: Exactly 1 solution (Lines have different slopes).
    2. Identical lines: Infinitely many solutions (Lines are the same; equations are multiples of each other).
    3. Parallel lines: No solution (Lines have the same slope but different intercepts; they never intersect).

Geometry of One Equation in Two Variables

  • Equation: ax+by=cax + by = c
  • Isolation of y: y=(ab)x+cby = (\frac{-a}{b})x + \frac{c}{b}
  • Solution Set: All points on the line. The general solution can be written as (u,(ab)u+cb)(u, (\frac{-a}{b})u + \frac{c}{b}), where uRu \in \mathbb{R}.
  • Vector Notation:(x0y0)=u(1a/b)+(0c/b)\begin{pmatrix} x_0 \\ y_0 \end{pmatrix} = u \begin{pmatrix} 1 \\ -a/b \end{pmatrix} + \begin{pmatrix} 0 \\ c/b \end{pmatrix}
    • Horizontal vector logic: All solutions=One specific solution+Line through origin parallel to original line\text{All solutions} = \text{One specific solution} + \text{Line through origin parallel to original line}.
  • Example Problem: For 3y+4x=153y + 4x = 15:
    • Solve for yy: y=43x+5y = \frac{-4}{3}x + 5.
    • If x=ux = u, points are (u,154u3)(u, \frac{15 - 4u}{3}). If y=uy = u, points are (153u4,u)(\frac{15 - 3u}{4}, u).
    • The point (0,5)(0, 5) is a solution (3(5)+4(0)=153(5) + 4(0) = 15).

Systems with Multiple Equations and Variables

2 Variables, 3 Equations

  • Form:
    • a11x1+a12x2=b1a_{11}x_1 + a_{12}x_2 = b_1
    • a21x1+a22x2=b2a_{21}x_1 + a_{22}x_2 = b_2
    • a31x1+a32x2=b3a_{31}x_1 + a_{32}x_2 = b_3
  • Method: Eliminate x1x_1 from the second and third equations using the first equation. This results in a system of two equations for x2x_2. If a consistent x2x_2 exists, back-substitute to find x1x_1.

3 Variables, 2 Equations

  • Scenario: Since there are more unknowns (n=3n=3) than equations (m=2m=2), the system usually has a free variable.
  • Method:
    1. Eliminate x1x_1 from the second equation.
    2. Treat one variable (e.g., x3x_3) as a constant or parameter uu.
    3. Solve the remaining 2×22 \times 2 system for x1x_1 and x2x_2 in terms of uu.
    4. The final result expresses the variables as a vector: x=p+uv\mathbf{x} = \mathbf{p} + u\mathbf{v}.

3 Variables, 3 Equations

  • Form: Standard structure for a unique solution.
  • Method: Perform Gaussian elimination to transform the rectangular coefficient matrix into a Triangular Matrix (or Row Echelon Form).
    • Zeros should appear below the diagonal.
    • Pivots: The diagonal elements (should be non-zero to proceed easily).

Elimination and Matrix Operations

  • Augmented Matrix: Combining coefficients and constants into one grid: [Ab][A | b].
  • Row Operations:
    • Subtracting a multiple of one row from another: R2R2(a21a11)R1R_2 \leftarrow R_2 - (\frac{a_{21}}{a_{11}})R_1.
  • Back-substitution: Once the matrix is triangular (e.g., bottom row is 0x1+0x2+a33x3=b30x_1 + 0x_2 + a_{33}x_3 = b_3), solve for the last variable and work upward to find the others.

General Solution Classification (mm eq, nn var)

  • Row Echelon Form (REF): Result of elimination.
  • Rank (rr): The number of non-zero rows (pivots) in REF.
  • Outcomes:
    1. No Solution: If the elimination results in a row like [0 \dots 0 | \b_k] where \b_k \neq 0 (contradiction).
    2. Unique Solution: Occurs when r=nr = n (rank equals the number of variables) and no contradictions exist.
    3. Infinitely Many Solutions: Occurs when r<nr < n and no contradictions exist. There are nrn - r free variables.

Example Exercises

  • Exercise 1: x1+2x2+3x3=4x_1 + 2x_2 + 3x_3 = 4 and 5x1+6x2+7x3=85x_1 + 6x_2 + 7x_3 = 8.
    • Row Op: R25R14x28x3=12    x2+2x3=3R_2 - 5R_1 \rightarrow -4x_2 - 8x_3 = -12 \implies x_2 + 2x_3 = 3.
    • Let x3=ux_3 = u, then x2=32ux_2 = 3 - 2u and x1=42(32u)3u=2+ux_1 = 4 - 2(3-2u) - 3u = -2 + u.
    • Vector Form: (x1x2x3)=(230)+u(121)\begin{pmatrix} x_1 \\ x_2 \\ x_3 \end{pmatrix} = \begin{pmatrix} -2 \\ 3 \\ 0 \end{pmatrix} + u \begin{pmatrix} 1 \\ -2 \\ 1 \end{pmatrix}.
  • Exercise 2: Checking unique/infinite solutions for parameter kk and dd.
    • Equations: 8x1+12x2=248x_1 + 12x_2 = 24 and 6x1+kx2=d-6x_1 + kx_2 = d.
    • The first simplifies to 2x1+3x2=62x_1 + 3x_2 = 6.
    • By comparison, if k=9k = -9 and d=18d = -18, the second equation is just 3×(2x1+3x2=6)-3 \times (2x_1 + 3x_2 = 6), leading to infinitely many solutions.

Detailed Definitions and Formatting

  • Pivot: The first non-zero element in a row used to eliminate elements below it.
  • Triangular Matrix: A matrix where all elements below the diagonal are zero, making it "easy to solve" via back-substitution.
  • LHS (Left Hand Side) and RHS (Right Hand Side): Terms used to verify if a candidate solution (x0,y0)(x_0, y_0) satisfies the original equation.