# Solving Linear Equations Using Matrices

Linear equations are the foundational blocks of algebra, and anyone who has studied basic elementary mathematics knows how they work. Let's cover them briefly, and we can then see how easily they can be solved using matrices in Python.

Linear equations are typically in the form:

Here, *a*1, *a*2,.., *a*n are the coefficients, and *x*1, *x*2,.. *x*n are variables.

These linear equations with two variables can be represented in a two-dimensional space graph where *x* is the horizontal dimension and *y* is the vertical dimension.

Let's take a quick example of a linear equation with two variables. Suppose the equation is *y = 2x + 6*. This representation is known as the **slope-intercept** form and has the format *y = mx + c*, where *m* is the slope and *c* is the *y* intercept of the equation.

Here, *m=2* and *c=6*, and the line can be drawn on a graph by plotting different values...