Skip to content

siddharth-shringarpure/Simultaneous-Equations-Solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‘‰ Simultaneous Equations Solver

Made with Python

Simple tool to solve systems of equations

โ„น๏ธ Requirements

  • Numpy (for solving using matrices)
  • String (native Python module)

๐Ÿ’ก How it works

  • Systems of equations can be modelled as matrices in order to solve them
  • The concept and example illustrated below explain the calculations that occur:

$$ A \begin{bmatrix} x \\ y \\ z \end{bmatrix} = C $$

$$ \begin{bmatrix} x \\ y \\ z \end{bmatrix} = A^{-1} C $$

Example

$$ 3x+2y-z=11 $$

$$ 2x-3y+z=7 $$

$$ 5x+y-2z=12 \ $$

$$ \therefore \begin{bmatrix} 3 & 2 & -1 \\ 2 & -3 & 1\\ 5 & 1 & -2 \end{bmatrix} \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 11 \\ 7 \\ 12 \end{bmatrix} $$

$$ \therefore \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \begin{bmatrix} 3 & 2 & -1 \\ 2 & -3 & 1\\ 5 & 1 & -2 \end{bmatrix}^{-1} \begin{bmatrix} 11 \\ 7 \\ 12 \end{bmatrix} = \begin{bmatrix} 4 \\ 2 \\ 5 \end{bmatrix} $$

Solutions

$$ x=4 \ $$

$$ y=2 \ $$

$$ z=5 $$

๐Ÿ‘Ž Limitations

  • Only supports three variables at the moment
  • Doesn't currently support float inputs

About

Simple tool to solve simultaneous equations

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages