β—€ Back to Note

Tony's Intertwingled Memex β€’ Reference Manual

Solving Systems of Linear Equations with Matrix Form

Formulas & Definitions
Core Definition

Any system of simultaneous linear equations can be represented compactly as a single matrix-vector equation:

Ax⃗=b⃗A\vec{x} = \vec{b}Ax=b
where:

  • AAA is the coefficient matrix containing the scalar multipliers of each variable.
  • xβƒ—\vec{x}x is the column vector of unknown variables.
  • bβƒ—\vec{b}b is the column vector of constant values.

When matrix AAA is invertible (square with non-zero determinant), the exact solution is given by:

xβƒ—=Aβˆ’1bβƒ—\vec{x} = A^{-1}\vec{b}x=Aβˆ’1b

Concept Explanation

Translating Linear Equations into Matrix Form

Consider a two-variable system of linear equations:

{a11t+a12s=b1a21t+a22s=b2\begin{cases} a_{11}t + a_{12}s = b_1 \\ a_{21}t + a_{22}s = b_2 \end{cases}{a11​t+a12​s=b1​a21​t+a22​s=b2​​

This translates directly into matrix multiplication:

[a11a12a21a22][ts]=[b1b2]\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} t \\ s \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}[a11​a21​​a12​a22​​][ts​]=[b1​b2​​]

Solving Efficiently with Matrix Calculators

In modern engineering practice, computing solutions to linear systems by hand via substitution or elimination can be slow and prone to arithmetic sign slips.

By expressing the system in matrix form Ax⃗=b⃗A\vec{x} = \vec{b}Ax=b, engineers solve for the variable vector x⃗\vec{x}x by multiplying both sides by the matrix inverse:

xβƒ—=Aβˆ’1bβƒ—\vec{x} = A^{-1}\vec{b}x=Aβˆ’1b

Using modern digital tools like the Desmos Matrix Calculator or scientific graphing calculators:

  1. Define Matrix A=[a11a12a21a22]A = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}A=[a11​a21​​a12​a22​​]
  2. Define Column Matrix B=[b1b2]B = \begin{bmatrix} b_1 \\ b_2 \end{bmatrix}B=[b1​b2​​]
  3. Command the calculator to evaluate:
    Aβˆ’1BA^{-1} BAβˆ’1B
    The output matrix immediately returns the exact scalar values for the unknowns [ts]\begin{bmatrix} t \\ s \end{bmatrix}[ts​].

Overdetermined Systems in 3D Geometry (333 Equations, 222 Unknowns)

When analyzing 3D lines in space (e.g. testing if two trajectories intersect in Relationships Between Lines in Space), we encounter systems with 3 coordinate equations (x,y,zx, y, zx,y,z) and 2 parameter unknowns (t,st, st,s):

{x1(t)=x2(s)β€…β€ŠβŸΉβ€…β€Šc1t+d1s=k1y1(t)=y2(s)β€…β€ŠβŸΉβ€…β€Šc2t+d2s=k2z1(t)=z2(s)β€…β€ŠβŸΉβ€…β€Šc3t+d3s=k3\begin{cases} x_1(t) = x_2(s) \implies c_1 t + d_1 s = k_1 \\ y_1(t) = y_2(s) \implies c_2 t + d_2 s = k_2 \\ z_1(t) = z_2(s) \implies c_3 t + d_3 s = k_3 \end{cases}βŽ©βŽ¨βŽ§β€‹x1​(t)=x2​(s)⟹c1​t+d1​s=k1​y1​(t)=y2​(s)⟹c2​t+d2​s=k2​z1​(t)=z2​(s)⟹c3​t+d3​s=k3​​

The 2-Step Matrix Verification Workflow:

  1. Solve the 2Γ—22 \times 22Γ—2 Subsystem: Select any two equations (e.g., equations 1 and 2), set up A=[c1d1c2d2]A = \begin{bmatrix} c_1 & d_1 \\ c_2 & d_2 \end{bmatrix}A=[c1​c2​​d1​d2​​] and B=[k1k2]B = \begin{bmatrix} k_1 \\ k_2 \end{bmatrix}B=[k1​k2​​], and compute [ts]=Aβˆ’1B\begin{bmatrix} t \\ s \end{bmatrix} = A^{-1} B[ts​]=Aβˆ’1B using a matrix calculator.
  2. Verify in the 3rd Equation (Consistency Check): Substitute the computed values of ttt and sss into the remaining 3rd equation (zzz-component):
    • Consistent (LeftΒ Side=RightΒ Side\text{Left Side} = \text{Right Side}LeftΒ Side=RightΒ Side): The lines share a common point and intersect.
    • Inconsistent (LeftΒ Sideβ‰ RightΒ Side\text{Left Side} \neq \text{Right Side}LeftΒ Sideξ€ =RightΒ Side): The system has no solution; the non-parallel lines are skew.

Engineering Applications

  • 3D Collision & Ray Tracing: Determining whether line-of-sight vectors intersect geometric mesh boundaries in computer graphics.
  • Structural Truss Statics: Solving simultaneous node equilibrium equations (βˆ‘Fx=0,βˆ‘Fy=0,βˆ‘Fz=0\sum F_x = 0, \sum F_y = 0, \sum F_z = 0βˆ‘Fx​=0,βˆ‘Fy​=0,βˆ‘Fz​=0) for member tension and compression forces.
  • Electrical Circuit Analysis: Solving Kirchhoff's Current Law (KCL) matrix systems across interconnected circuit meshes.

Example Problems

Example 1: Solving a 2Γ—22 \times 22Γ—2 Parameter System via Matrix Form

Solve the linear parameter system:

{5t+6s=βˆ’1βˆ’6t+12s=1\begin{cases} 5t + 6s = -1 \\ -6t + 12s = 1 \end{cases}{5t+6s=βˆ’1βˆ’6t+12s=1​

Solution
  1. Write in Matrix Form Ax⃗=b⃗A\vec{x} = \vec{b}Ax=b:
    [56βˆ’612][ts]=[βˆ’11]\begin{bmatrix} 5 & 6 \\ -6 & 12 \end{bmatrix} \begin{bmatrix} t \\ s \end{bmatrix} = \begin{bmatrix} -1 \\ 1 \end{bmatrix}[5βˆ’6​612​][ts​]=[βˆ’11​]
  2. Formulate the Matrix Solution:
    [ts]=[56βˆ’612]βˆ’1[βˆ’11]\begin{bmatrix} t \\ s \end{bmatrix} = \begin{bmatrix} 5 & 6 \\ -6 & 12 \end{bmatrix}^{-1} \begin{bmatrix} -1 \\ 1 \end{bmatrix}[ts​]=[5βˆ’6​612​]βˆ’1[βˆ’11​]
  3. Evaluate via Matrix Calculator: Entering matrix AAA and column vector BBB into a matrix calculator yields:
    [ts]=[βˆ’316βˆ’196]\begin{bmatrix} t \\ s \end{bmatrix} = \begin{bmatrix} -\frac{3}{16} \\ -\frac{1}{96} \end{bmatrix}[ts​]=[βˆ’163β€‹βˆ’961​​]
    Therefore, t=βˆ’316t = -\frac{3}{16}t=βˆ’163​ and s=βˆ’196s = -\frac{1}{96}s=βˆ’961​.

Connections & References

  • Parent Concepts: Vectors in 2D and 3D | Equations of Lines in 3D
  • Related Notes: Relationships Between Lines in Space | Dot and Cross Products
  • Course Sessions: Calc-3 Session 04