Search⌘ K

System of Linear Equations Solution

Understand how to solve systems of linear equations by applying matrix algebra techniques including matrix inversion and Gaussian elimination. Learn to implement these methods in R and C++ using libraries like RcppArmadillo and Eigen for efficient computation. This lesson equips you with practical skills to compute solutions and verify results across different matrix algebra tools.

System of linear equations

A system of linear equations takes the following form:

𝐴π‘₯=𝑏𝐴π‘₯ = 𝑏

In this equation:

  • 𝐴𝐴 is a square coefficient matrix.
  • π‘₯π‘₯ is the vector of unknowns.
  • 𝑏𝑏 is the RHS (right hand side) vector.

It can be solved by multiplying the inverse of matrix 𝐴𝐴 by RHS constant vector 𝑏𝑏:

π‘₯=π΄βˆ’1𝑏π‘₯ = 𝐴^{βˆ’1}𝑏

Let’s suppose, the system of linear equations is formed by two equations and two unknowns:

x1 βˆ’ 1βˆ—x2=2 ...