# Linear Equations Solver

## Introduction:

The linear equation of one variable is of the form ax + b = 0, where a and b are real numbers and a is not equal to 0. This equation has one and only solution. (i.e) the value of the variable x is unique.
The linear equation of two variables is of the form ax + by + c = 0. Since the graph of the linear equation is a straight line, the points which lie on this line form the solution to the given equation.  The solutions also satisfy the equation.
If we have more than one equation, we can discuss about  common solutions as follows.

## Linear Equations of one variable:

### Solving two step linear equations:

For any given linear equation of the form ax + b = 0,
Step 1: Subtracting b from both sides,
ax + b - b = 0 - b [ since b - b = 0 ]
=>           ax = -b
Step 2: Dividing by a on both sides.
=>       $\frac{ax}{a}$ =  $\frac{-b}{a}$
=>            x = -$\frac{b}{a}$

Hence the final solution is x = - b/a
Example : solve 3x +  12 = 0
solution: Comparing this with the general equation ax + b = 0,
we get a = 3, b = 12
Therefore the solution ,       x = - $\frac{b}{a}$ = - $\frac{12}{3}$ = - 4

## Linear Equations of two variables:

#### Solving system of linear equations of two variables.

Let the two linear equations of two variables x and y be,
a1 x + b1 y +c1 =  0
a1 x + b2 y + c1 = 0
The above two equations can be solved for the variables x and y.
Since the graph of the above equations are straight line, the above pair of equations will satisfy any one of the following conditions.
(1) Two lines intersect at a point.
(2) The two lines do not intersect at all ( two lines are parallel )
(3) the two lines coincide.

#### Methods of solving linear equations of two variables:

The following are the methods used to solve the linear equations of two variables.
1. substitution Method.
2. Elimination Method.
3. Cross multiplication Method.
4. Graphical Method.
5. Matrix Method.

#### Solutions of system of linear equations of two variables (Linear Equations Solver online):

1. Unique solution:  When the two lines intersect the, the point of intersection is the common solution to the two equations, since it satisfy both the equations.

#### Example : Find the point(s)( if any )  common to the given equations  2x + y = 7 and 3x - y =3

Solution: Let us solve the equations by Elimination Method.
Let us first number the equations as (1) and (2)
2x + y = 7 -------------------------------(1)
3 x -  y = 3 -------------------------------(2)
_______________
On adding (1) and (2), we get    5x         = 10  [ since + y - y = 0 ]
x = 10/5
x = 2
Substituting x=2, in Equation (1), we get,
2(2) + y = 7
4 + y  = 7
y  = 7 - 4 = 3
=>   y  = 3
Hence the common solution, which is the point of intersection of the two lines represented by the given two equations is (x,y) = ( 2, 3).
2. No solution: When the two lines do not intersect, they will be parallel to each other.  Hence the pair of equations do not have any solution.

#### Example:   Find the solution(s) common( if any )  to the given equations 3x + y = 10 , 6x + 2y = -5

Solution: Let us solve the given equations by elimination method.
Let us first number the equations.             3x + y = 10  ---------------------(1)
6x + 2y = -5  ---------------------(2)

Multiplying Equation (1) by 2, we get 2 ( 3x + y ) = 2 ( 10)
=>           6x  +  2y   = 20  ----------------------(3)
6x + 2y     = -5  -----------------------(2)
(-)     (-)         (+)
________________________
Subtracting (2) from (3), we get                      0  =  25 , which is  a false statement.
Hence the above system of equations have no solution.

3. Infinite number of solutions:  When the two lines coincide, there will be infinite number of points common to both the lines when we graph them.
Hence there will be infinite number of common solutions.

#### Example : Find the solution (s) ( if any ) for the equations  3x + 2y = 10 and 6x + 4y = 20

Solution: Let us solve the two equations by elimination method.
Let us first number the equations .   3x + 2y = 10  ----------------------------(1)
6x + 4 y = 20 ---------------------------(2)
Multiplying Equation (1) by 2, we get,        2 ( 3x + 2y ) = 2 ( 10)
6x + 4y  = 20 ----------------------------(3)
6x + 4y  = 20  ---------------------------(2)
__________________
Subtracting (2) from (3), we get                  0 = 0, which is true.
This is true for any values of x.
Since the values of y depends on the values of x,   there will be infinite number of values for x and the corresponding values of y.
Hence there will be infinite number of ordered pairs (x,y) common to both the lines ( equations ).

## Practice Questions:

1. Solve the following linear equations of one variable by two step method.
a.  4x + 15 = -1
b.  5 + 3x = 11
2. Solve the following pairs of equations, write the common solution/solutions if any.
a.  3x + 5y = -2 ; 4x - y = 5
b.  4x + 3y = 10, 12 x + 9 y = 30.
c.  8x + 3y = 11, 16 x + 6y = 22.

*****