If you see this, something is wrong
To get acquainted with the document, the best thing to do is to select the "Collapse all sections" item from the "View" menu. This will leave visible only the titles of the top-level sections.
Clicking on a section title toggles the visibility of the section content. If you have collapsed all of the sections, this will let you discover the document progressively, from the top-level sections to the lower-level ones.
Generally speaking, anything that is blue is clickable.
Clicking on a reference link (like an equation number, for instance) will display the reference as close as possible, without breaking the layout. Clicking on the displayed content or on the reference link hides the content. This is recursive: if the content includes a reference, clicking on it will have the same effect. These "links" are not necessarily numbers, as it is possible in LaTeX2Web to use full text for a reference.
Clicking on a bibliographical reference (i.e., a number within brackets) will display the reference.
Speech bubbles indicate a footnote. Click on the bubble to reveal the footnote (there is no page in a web document, so footnotes are placed inside the text flow). Acronyms work the same way as footnotes, except that you have the acronym instead of the speech bubble.
By default, discussions are open in a document. Click on the discussion button below to reveal the discussion thread. However, you must be registered to participate in the discussion.
If a thread has been initialized, you can reply to it. Any modification to any comment, or a reply to it, in the discussion is signified by email to the owner of the document and to the author of the comment.
The blue button below that says "table of contents" is your tool to navigate in a publication.
The left arrow brings you to the previous document in the publication, and the right one brings you to the next. Both cycle over the publication list.
The middle button that says "table of contents" reveals the publication table of contents. This table is hierarchical structured. It has sections, and sections can be collapsed or expanded. If you are a registered user, you can save the layout of the table of contents.
First published on Sunday, Jun 30, 2024 and last modified on Thursday, Apr 10, 2025
Mathedu SAS
In that note, we shall browse the different ways to solve the systems of 2 linear equations of 2 variables.
We first see the substitution / elimination method, where we derive the condition to have a unique solution to our system.
Then we enter linear algebra in a strict acception, to study and prove the solution of a matrix equation that is equivalent to our linear system.
That exploration leads us to define and study many notions related to matrix and column vectors algebra.
And we end that note studying the case of zero determinant, where the set of solutions is either infinite or void.
We shall see how the substitution/elimination method solves the nearly every \( 2\times 2\) linear systems.
Definition 1
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers such as \( b\) and \( a\) are not zero together, and \( c\) and \( d\) are not zero together. Then solving the system of 2 linear equations of 2 real variables:
(1)
is finding the couple of real numbers \( (x,y)\in\mathbb{R}^2\) that fulfils both equations of the system together.
By the end of that section, we shall use the system 32 for some given real numbers \( (a,b,c,d,e,f)\in\mathbb{R}^6\) .
If \( a=0\) , then \( b\neq 0\) , \( c\) and \( d\) are not zero together, and the system becomes:
(2)
As \( b\neq 0\) , the first equation \( by=e\) has a unique solution in , and that solution is:
(3)
Then we may substitute \( y\) with its value \( y=\frac{e}{b}\) in the second equation \( y=\frac{e}{b}\) .
The variable \( y\) is eliminated, and we obtain the equation in \( x\) :
(4)
The equation 4 is equivalent to the equation in \( x\) \( cx=f-\frac{de}{b}=\frac{fb}{b}-\frac{de}{b}=\frac{bf-de}{b} \)
That equation has a unique solution in \( x\) if and only if \( c\neq 0\) , and that solution is:
(5)
Consequently, the \( 2\times 2\) linear system 2 has a unique solution in \( (x,y)\in\mathbb{R}^2\) if and only if \( c\neq 0\) , that is equivalent to \( bc\neq 0\) (because \( b\neq 0\) ), and that solution is:
(6)
If \( a\neq 0\) , then we may solve the first equation \( ax+b=e\) in \( x\) .
It becomes: \( ax=e-by\) , leading to \( x=\frac{e-by}{a}\) .
The solution depends on \( y\) and is:
(7)
Then we may substitute \( x\) with its value \( x=\frac{e}{a}-\frac{b}{a}y\) in the second equation \( cx+dy=f\) .
The variable \( x\) is eliminated, and we obtain the equation in \( y\) :
(8)
Then we may distribute \( c\) and put \( y\) into factor in the first member of the equation 8, to obtain:
(9)
If we multiply both members of the equality by \( a\) , that is non zero, the equation 9 is equivalent to:
(10)
Then we may substitute with its value in equation (III), in the equation 7 goving the value of \( x\) as a function of \( x\) :
(11)
The solution in \( x\) of the system 32 is the following (where we find again the condition \( ad-bc\neq 0\) ):
(12)
Consequently, when \( a\neq 0\) the \( 2\times 2\) linear system 32 has a unique solution in \( (x,y)\in\mathbb{R}^2\) if and only if \( ad-bc\neq 0\) , and that solution is:
(13)
If \( a=0\) the following facts hold with the solution in the case \( a\neq 0\) :
The condition \( ad-bc\neq 0\) becomes \( bc\neq0\) .
It is the condition to have a unique solution when \( a=0\) .
The solution when \( ad-bc\neq 0\) , that is \( (x,y)=\left(\frac{de-bf}{ad-bc},\;\;\frac{af-ce}{ad-bc}\right)\) becomes \( (x,y)=\left(\frac{bf-de}{bc},\frac{e}{b}\right)\) .
It is the solution we found in the case \( a=0\) when \( bc\neq 0\) .
Consequently, we may get rid of the condition about \( a\) , and set the theorem below.
Theorem 1
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers such as \( a\) and \( b\) are not zero together, and \( c\) and \( d\) are not zero together. Then the system of 2 linear equations of 2 real variables:
(14)
has a unique solution in \( (x,y)\in\mathbb{R}^2\) if and only if \( ad-bc\neq 0\) , and that solution is:
(15)
Definition 2
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers such as \( a\) and \( b\) are not zero together, and \( c\) and \( d\) are not zero together. Consider the system of 2 linear equations of 2 real variables:
(16)
Let’s define the following matrix objects related to the linear system 32:
The matrix of the sytem is the square matrix with 2 rows and 2 columns:
(17)
The second member vector of the system is the column vector with 2 elements:
(18)
The unknown vector of the system is the column vector with 2 elements:
(19)
Definition 3
Assume \( (a,b,c,d,x,y)\in\mathbb{R}^6\) are real numbers, and consider the square \( 2\times 2\) matrix \( A=\begin{bmatrix}a&b\\c&d\end{bmatrix}\) and the column vector with 2 elements \( X=\begin{bmatrix}x\\y\end{bmatrix}\) . Then the matrix product of \( A\) and \( X\) is defined as:
(20)
Then, for a linear system 32 with matrix \( A\) :
The first element of the product \( AX\) is the left member of the first equation of the system.
The second element of the product \( AX\) is the left member of the second equation of the system.
Theorem 2
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers such
as \( b\) and \( a\) are not zero together, and \( c\) and \( d\) are not zero
together, and consider the matrix
\( A=\begin{bmatrix}a&b\\c&d\end{bmatrix}\) , the column vector
\( B=\begin{bmatrix}e\\f\end{bmatrix}\) , and the unkown column
vector
\( X=\begin{bmatrix}x\\y\end{bmatrix}\) .
Then the system of 2 linear equations of 2 real variables:
(21)
is equivalent to the matrix equation:
(22)
Definition 4
Assume \( (a,b,c,d)\in\mathbb{R}^6\) are real numbers and consider the matrix
\( A=\begin{bmatrix}a&b\\c&d\end{bmatrix}\) .
Let’s define the following notions related to the matrix \( A\) :
The determinant of the matrix \( A\) is defined as \( \det(A)=ad-bc\) .
If \( \det(A)\neq 0\) , the inverse of the matrix \( A\) is defined as:
(23)
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers such as
\( ad-bc\neq 0\) .
Then \( a\) and \( b\) are not zero together, and \( c\) and \( d\) are not zero
together.
Let’s multiply the inverse \( A^{-1}\) of the matrix \( A\) , and the column vector \( B\) :
(24)
So that \( A^{-1}B\) is the column vector with 2 elements:
(25)
Its elements compose the solution 13 of the system of linear equations equivalent to the vectorial equation \( AX=B\) :
(26)
We say that the column vector \( X=A^{-1}B\) is the solution of the matrix equation \( AX=B\) .
The next section will prove directly that \( X=A^{-1}B\) actually verifies the matrix equation \( AX=B\) .
Definition 5
Assume \( (a,b,c,d,e,f,g,h)\in\mathbb{R}^8\) are real numbers, and let’s consider the \( 2\times 2\) matrices: \( A=\begin{bmatrix}a&b\\c&d\end{bmatrix}\) and \( B=\begin{bmatrix}e&f\\g&h\end{bmatrix}\) .
Then the matrix product of \( A\) and \( B\) is defined as:
(27)
Definition 6
The \( 2\times 2\) Identity Matrix is defined as: \( I=\begin{bmatrix}1&0\\0&1\end{bmatrix}\)
Theorem 3
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers, and consider the square matrix \( A=\begin{bmatrix}a&b\\c&d\end{bmatrix}\) and the column vector \( B=\begin{bmatrix} e\\f \end{bmatrix}\) .
Then \( IA=A\) , \( AI=A\) , and \( IB=B\)
Proof
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers, and consider the square matrix \( A=\begin{bmatrix}a&b\\c&d\end{bmatrix}\) and the column vector \( B=\begin{bmatrix} e\\f \end{bmatrix}\) .
Then the matrix product of \( I\) end \( A\) is:
(28)
Moreover, the matrix product of \( A\) end \( I\) is:
(29)
And the matrix product of \( I\) end \( B\) is:
(30)
Theorem 4
Assume \( A\) is a \( 2\times 2\) matrix of determinant \( \det(A)\neq 0\) , and \( B\) is a column vector of \( 2\) elements.
Consider the column vector with \( 2\) elements \( X=A^{-1}B\) .
Then \( X\) verifies the equality \( AX=B\) , so that it is the solution of the matrix equation \( AX=B\) .
To prove that theorem, we need the following lemma about associativity of the matrix multiplication.
Lemma 1
Assume \( M\) and \( N\) are two \( 2\times 2\) matrices, and \( V\) is a column vector of \( 2\) elements.
Then \( M(NV)=(MN)V\) .
Proof (of the lemma 1)
Consider the matrices with real elements \( M=\begin{bmatrix} m_{11}&m_{12}\\m_{21}&m_{22} \end{bmatrix}\) and
\( N=\begin{bmatrix} n_{11}&n_{12}\\n_{21}&n_{22} \end{bmatrix}\) , and the column vector with two real elements \( V=\begin{bmatrix} v_{1}\\v_{2} \end{bmatrix}\) .
Then we may perform the folllowing calculations.
\( MN=\begin{bmatrix} m_{11}&m_{12}\\m_{21}&m_{22} \end{bmatrix} \begin{bmatrix} n_{11}&n_{12}\\n_{21}&n_{22} \end{bmatrix} =\begin{bmatrix} m_{11}n_{11}+m_{12}n_{21}&m_{11}n_{12}+m_{12}n_{22}\\ m_{21}n_{11}+m_{22}n_{21}&m_{21}n_{12}+m_{22}n_{22} \end{bmatrix}\)
and
\( (MN)V=\begin{bmatrix} m_{11}n_{11}+m_{12}n_{21}&m_{11}n_{12}+m_{12}n_{22}\\ m_{21}n_{11}+m_{22}n_{21}&m_{21}n_{12}+m_{22}n_{22} \end{bmatrix} \begin{bmatrix} v_{1}\\v_{2} \end{bmatrix}\)
\( =\begin{bmatrix} (m_{11}n_{11}+m_{12}n_{21})v_{1}+(m_{11}n_{12}+m_{12}n_{22})v_{2}\\ (m_{21}n_{11}+m_{22}n_{21})v_{1}+(m_{21}n_{12}+m_{22}n_{22})v_{2} \end{bmatrix}\)
\( =\begin{bmatrix} m_{11}n_{11}v_{1}+m_{12}n_{21}v_{1}+m_{11}n_{12}v_{1}+m_{12}n_{22}v_{2}\\ m_{21}n_{11}v_{1}+m_{22}n_{21}v_{1}+m_{21}n_{12}v_{1}+m_{22}n_{22}v_{2} \end{bmatrix}\)
\( NV=\begin{bmatrix} n_{11}&n_{12}\\n_{21}&n_{22} \end{bmatrix} \begin{bmatrix} v_{1}\\v_{2} \end{bmatrix} = \begin{bmatrix} n_{11}v_{1}+n_{12}v_{2}\\n_{21}v_{1}+n_{22}v_{2} \end{bmatrix}\)
and
\( M(NV)=\begin{bmatrix} m_{11}&m_{12}\\m_{21}&m_{22} \end{bmatrix} \begin{bmatrix} n_{11}v_{1}+n_{12}v_{2}\\n_{21}v_{1}+n_{22}v_{2} \end{bmatrix}\)
\( = \begin{bmatrix} m_{11}(n_{11}v_{1}+n_{12}v_{2})+m_{12}(n_{21}v_{1}+n_{22}v_{2})\\ m_{21}(n_{11}v_{1}+n_{12}v_{2})+m_{22}(n_{21}v_{1}+n_{22}v_{2}) \end{bmatrix}\)
\( = \begin{bmatrix} m_{11}n_{11}v_{1}+m_{11}n_{12}v_{2}+m_{12}n_{21}v_{1}+m_{12}n_{22}v_{2}\\ m_{21}n_{11}v_{1}+m_{21}n_{12}v_{2}+m_{21}n_{21}v_{1}+m_{21}n_{22}v_{2} \end{bmatrix}\)
\( =\begin{bmatrix} m_{11}n_{11}v_{1}+m_{12}n_{21}v_{1}+m_{11}n_{12}v_{1}+m_{12}n_{22}v_{2}\\ m_{21}n_{11}v_{1}+m_{22}n_{21}v_{1}+m_{21}n_{12}v_{1}+m_{22}n_{22}v_{2} \end{bmatrix} =(MN)V\)
Proof (of the theorem 4)
Assume \( A\) is a \( 2\times 2\) matrix of determinant \( \det(A)\neq 0\) , and \( B\) is a column vector of \( 2\) elements, and consider the column vector with \( 2\) elements \( X=A^{-1}B\) .
Then \( AX=A(A^{-1}B)\) .
We may move the parentheses because of the lemma 1, so that
\( AX=(AA^{-1})B=IB=B\) .
We end that note with the solution of the \( 2\times 2\) linear systems with a zero determinant, so that we will have solved any \( 2\times 2\) linear system.
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers such as:
\( a\) and \( b\) are not zero together,
\( c\) and \( d\) are not zero together,
\( ad-bc=0\)
By the end of that section, we shall consider the \( 2\times 2\) Linear System:
(31)
As \( ad-bc=0\) , the system is said to have a zero determinant.
In that case, \( ad-bc=-bc=0\) , so that \( bc=0\) as well.
In that case, as \( a\) and \( b\) are not zero together, \( b\neq 0\) .
Then the first equation is \( by=e\) , with \( b\neq 0\) , so that \( y=\frac{e}{b}\) .
Substituting that value to in the second equation gives \( cx+d\frac{e}{b}=f\) , that is equivalent to \( cx=f-d\frac{e}{b}=\frac{bf-de}{b}\) .
If we multiply both members of the last equality by \( b\neq 0\) , we obtain
\( bf-de=bcx\) , that is equal to \( 0\) because \( bc=0\) .
Consequently, there are solutions in \( x\) if and only if \( bf-de=0\) , in which case the set of solutions is the horizontal line of equation \( y=\frac{e}{b}\) .
Note that, because \( a=0\) and \( b\neq 0\) , the equation of the straight line is also the first equation \( ax+by=e\) of the system 32.
Otherwise, if \( bf-de\neq 0\) , there are no solution, and the set of solutions is the void set \( \emptyset\) .
In that case, as \( ad=0\) , \( d=0\) , and as \( c\) and \( d\) are not zero together, \( c\neq 0\) .
As a consequence, as \( bc=0\) , \( b=0\) , and the first equation is \( ax=e\) , with \( a\neq 0\) , so that \( x=\frac{e}{a}\) .
Substituting that value to \( x\) in the second equation gives \( c\frac{e}{a}+dy=f\) , that is equivalent to \( dy=f-c\frac{e}{a}=\frac{af-ce}{a}\) .
If we multiply both members of the last equality by \( a\neq 0\) , we obtain \( af-ce=ady\) , that is equal to \( 0\) because \( ad=0\) .
Consequently, there are solutions in \( x\) if and only if \( af-ce=0\) , in which case the set of solutions is the verical line of equation \( x=\frac{e}{a}\) .
Note that, because \( a\neq 0\) and \( b=0\) , the equation of the straight line is also the first equation \( ax+by=e\) of the system 32.
Otherwise, if \( af-ce\neq 0\) , there are no solution, and the set of solutions is the void set \( \emptyset\) .
In that case, as \( ad-bc=0\) , \( bc=ad\neq 0\) as well.
Consequently, all the numbers \( a\) , \( b\) , \( c\) and \( d\) are non zero, and the equality \( ad=bc\) is the cross product expression of the fractional equality \( \frac{a}{b}=\frac{c}{d}\) .
Let’s denote \( k=\frac{a}{b}=\frac{c}{d}\) , so that the system is equivalent to the following system:
If we solve the first equation \( ax+by=e\) in \( y\) , we obtain \( y=-\frac{a}{b}x+\frac{e}{b}=-kx+\frac{e}{b}\)
And if we solve the second equation \( cx+dy=f\) in \( y\) , we obtain \( y=-\frac{c}{d}x+\frac{f}{d}=-kx+\frac{f}{d}\)
These are the equations of two parallel straight lines (with slope \( -k\) ), that intersect if and only if they are equal to one another.
Consequently, the system has solutions if and only if \( \frac{e}{b}=\frac{f}{d}\) , and if we denote it \( l=\frac{e}{b}=\frac{f}{d}\) , the set of solutions is the straight line with equation \( y=-kx+l\) .
Note that the equation of the straight line is also \( kx+y=l\) or, of we multiply both members of the equality by \( b\neq 0\) , the first equation \( ax+b=e\) of the system 32.
Otherwise, if \( \frac{e}{b}\neq \frac{f}{d}\) , there are no solution, and the set of solutions is the void set \( \emptyset\) .
We have thus proved the following theorem.
Theorem 5
Assume \( (a,b,c,d,e,f)\in\mathbb{R}^6\) are real numbers such as:
\( a\) and \( b\) are not zero together,
\( c\) and \( d\) are not zero together,
\( ad-bc=0\)
Then the set of solutions of the \( 2\times 2\) Linear System:
(32)
is either the straight line of equation \( ax+by=e\) , and thus an infinite set, or the void set \( \emptyset\) .
The systems of 2 linear equations of 2 variables may be first solved directly with the substitution / elimination method, that splits in the following steps:
Solve the first equation in \( x\) (or in \( y\) if the coefficient \( a\) of \( x\) is zero).
Substitute the value of \( x\) in function of \( y\) (or the value of \( y\) in function of \( x\) ) obtained in the second equation.
If we obtain an equation in \( y\) (or in \( x\) ), solve it to obtain the value of \( y\) (or \( x\) ). Otherwise, we obtain an equality that is either true or false.
If we got the value of \( y\) (or the value of \( y\) in function of \( x\) ) in the second step, substitute it to the value of \( x\) (or \( y\) ) obtained at the first step.
Then the solution or set of solutions is the following, depending on the results of the step above:
If \( a\neq 0\) and the steps (II) gives an equation in \( y\) , then the solution in \( x\) is given by the step (IV), and the solution in \( y\) is given by the step (III).
If \( a=0\) and the steps (II) gives an equation in \( x\) , then the solution in \( x\) is given by the step (III), and the solution in \( y\) is given by the step (I).
If the steps (II) gives an equality that is always true, then the set of solutions is the straight line of equation the first equation of the system.
If the steps (II) gives an equality that is false, then the system has no solution.
Another way to solve linear systems with a unique solution is to translate them into a matrix equation for which the matrix has a non zero determinant.
And when we wanted to solve and prove the solution of such a matrix equation, we explored the matrices and column vectors following notions and facts:
The multiplication of a \( 2\times 2\) matrix and a column vector with \( 2\) elements.
The multiplication of two \( 2\times 2\) matrices to one another
The determinant and inverse of a \( 2\times 2\) matrix.
The definition and properties of the \( 2\times 2\) identity matrix
The associativity of the multiplication of two \( 2\times 2\) matrices and a column vector with \( 2\) elements.