If I have 4 equations and 3 unknowns, I could solve for the 3 unknowns using the first 3. How does it ensure that the 4th equation is also satisfied? In this case, what should be the usual strategy to solve for the unknowns?

  • 3
    $\begingroup$ The solution you got from first 3 equations must also satisfy the 4th equation, otherwise the system is inconsistent. $\endgroup$
    – AgentS
    Oct 2, 2014 at 7:25
  • $\begingroup$ Just to be clear, are you dealing with four linear equations? $\endgroup$
    – JimmyK4542
    Oct 2, 2014 at 7:27
  • 1
    $\begingroup$ There is no guarantee that the 4th equation will be satisfied. I'm sure you can write down an example where such a system has no solution. $\endgroup$ Oct 2, 2014 at 7:28
  • $\begingroup$ If you have more equations $(M)$ than variables $(N)$, if you pick randomly $(N)$ equations among $(M)$, you would get a solutions. But there is absolutely no reason that the remaining equations be satisfied (except if they are linear combinations of the selected). $\endgroup$ Oct 2, 2014 at 7:33
  • $\begingroup$ Yes, the equations are linear. $\endgroup$ Oct 2, 2014 at 7:47

3 Answers 3


With the general solution to the (sub)system of the first three equations in hand, one can simply substitute this solution in the fourth equation and see for which values it is satisfied. Since there are more conditions than unknowns, we should expect that generically there are no solutions.

Procedurally, given a system $$a_{i1} x + a_{i2} y + a_{i3} z = b_i, \qquad i \in \{1, 2, 3, 4\},$$ we can solve the system by forming the matrix $$ [A \, | \, b] = \left(\begin{array}{ccc|c} a_{11} & a_{12} & a_{13} & b_1 \\ a_{21} & a_{22} & a_{23} & b_2 \\ a_{31} & a_{32} & a_{33} & b_3 \\ a_{41} & a_{42} & a_{43} & b_4 \end{array}\right)$$ and row-reducing to echelon form. The system admits no solution iff at any point during the reduction the matrix has a row of the form $$\left(\begin{array}{ccc|c} 0 & 0 & 0 & \ast \\ \end{array}\right)$$ with $\ast$ nonzero (because this corresponds to the insoluble equation $0 = \ast$).

Finally, notice that the existence of a solution is equivalent to the fourth column in $[A \, | \, b]$ being in the span of the first three columns. In this case, the columns are linearly dependent, and so $\det [A \, | \, b] = 0$. Thus, $$\det [A \, | \, b] = 0$$ is a necessary (but, as you can easily show, not quite sufficient) condition for the existence of a solution to the linear system. (Whether this is useful depends on your tools, the matrices, and your purpose, as computing a $4 \times 4$ determinant can be labor-intensive, and in the case where there are solutions, this computation doesn't tell you what they are).


My approach to this would be to put the first three equations in echelon form by starting a Gaussian Reduction. For example : $$ \begin{alignat*}{4} x & {}+{} & 3y & {}+{} & 2z & {}={} & 13 \\ & {}{} & y & {}+{} & z & {}={} & 6\\ & {}{} & & {}{} & 3z & {}={} & 10 \end{alignat*} $$

Then, I would express the left side of the fourth equation in terms of the first three ones. It's easy since the three equations are in triangular form. Start to find the coefficient in front of the first one (the only one which contains an $x$), then the second one, then the last one.

Then calculate the right side to know which number it should be equal to. If the combination of the first three equations and the fourth equation yield the same result, your system is consistant. If they don't, it's not.


For equations:


How do one ensure that that all equation are consistent?

You need to check if: $$\begin{vmatrix}a_1&b_1&c_1&d_1\\a_2&b_2&c_2&d_2\\a_3&b_3&c_3&d_3\\a_4&b_4&c_4&d_4\end{vmatrix}=0$$

Or you need to check: $$a_2 b_4 c_3 d_1-a_2 b_3 c_4 d_1-a_1 b_4 c_3 d_2+a_1 b_3 c_4 d_2-a_2 b_4 c_1 d_3+a_1 b_4 c_2 d_3+a_2 b_1 c_4 d_3-a_1 b_2 c_4 d_3+a_4 (b_3 (c_2 d_1-c_1 d_2)+b_2 (c_1 d_3-c_3 d_1)+b_1 (c_3 d_2-c_2 d_3))+a_2 b_3 c_1 d_4-a_1 b_3 c_2 d_4-a_2 b_1 c_3 d_4+a_1 b_2 c_3 d_4+a_3 (b_4 (c_1 d_2-c_2 d_1)+b_2 (c_4 d_1-c_1 d_4)+b_1 (c_2 d_4-c_4 d_2))=0$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.