Tutorials › Linear Algebra › Checking Candidate Solutions by Substitution

Linear Systems and Solution Sets · Tutorial 8 of 1000

Checking Candidate Solutions by Substitution

Practise substituting an ordered tuple into each equation and deciding exactly whether it satisfies the whole system.

Beginner 8 min read

What You'll Learn

  • Match each coordinate of a candidate tuple to the stated variable order.
  • Substitute the candidate values into every equation in a system.
  • Evaluate each left-hand side carefully, including negative values and coefficients.
  • Identify a single failed equation that rules out a proposed solution.
  • Check a candidate using the rows of a coefficient matrix and its right-hand-side vector.

What It Means to Check a Candidate

A proposed solution to a system is a list of values for its variables. To check that proposal, substitute the values into the equations and test whether each equation is true. This is a direct test: it does not require solving the system. If even one equation fails, the proposed list is not a solution of the system.

The order of the values matters. If the variables have been ordered as \(x,y\), then the candidate \((2,3)\) means \(x=2\) and \(y=3\), not \(x=3\) and \(y=2\). For variables ordered as \(x,y,z\), the tuple \((a,b,c)\) means \(x=a\), \(y=b\), and \(z=c\). Throughout this tutorial, all variables and candidate values are real numbers.

Definition: A candidate tuple for a system in the ordered variables \(x_1,\dots,x_n\) is an ordered list \((a_1,\dots,a_n)\) of real numbers. It is a solution of the system if substituting \(x_i=a_i\) for every \(i\) makes every equation in the system true.

“Every equation” is essential. A candidate that satisfies most, but not all, of the equations is not a solution of the system. A useful habit is to keep one line of arithmetic for each equation and compare the evaluated left-hand side with that equation’s right-hand side. Do not stop after checking the first equation: a candidate can pass one equation and fail another.

The Substitution Test

Theorem (Candidate solution test): For a system of equations in ordered variables \(x_1,\dots,x_n\), the tuple \((a_1,\dots,a_n)\) is a solution if and only if, in every equation, replacing each \(x_i\) by \(a_i\) makes the left-hand side equal the right-hand side.

Proof. Suppose first that \((a_1,\dots,a_n)\) is a solution. By the definition of a solution, substituting \(x_i=a_i\) into every equation makes every equation true; in particular, each left-hand side equals its right-hand side. Conversely, suppose that substituting \(x_i=a_i\) makes the left-hand side equal the right-hand side in every equation. Then every equation in the system is true for those values. By the definition of a solution, \((a_1,\dots,a_n)\) is a solution. Both implications use the requirement that all the equations pass the test. \(\square\)

The test gives a quick way to disprove a proposed solution: one failed equation is enough. If an equation evaluates to \(6=9\), for example, it is false, so the tuple cannot satisfy the whole system. This conclusion is only about that candidate tuple. It does not, by itself, tell us whether some different tuple might satisfy the system.

Worked Example: A Candidate That Satisfies Every Equation

Check whether \((3,2)\) is a solution of the system in the ordered variables \(x,y\):

$$ \begin{aligned} x+2y&=7,\\ 3x-y&=7. \end{aligned} $$

The tuple means \(x=3\) and \(y=2\). Substitute these values into the first equation:

$$ x+2y=3+2(2)=3+4=7. $$

The first equation is true. Substitute into the second equation:

$$ 3x-y=3(3)-2=9-2=7. $$

The second equation is also true. Since both equations pass the test, \((3,2)\) is a solution of the system.

Check: using \(x=3\) and \(y=2\), the two left-hand sides evaluate to \(7\) and \(7\), respectively, exactly matching the two right-hand sides.

Worked Example: One Failed Equation Rules Out the Tuple

Check whether \((2,3)\) is a solution of the system in \(x,y\):

$$ \begin{aligned} x+2y&=8,\\ 2x-y&=1,\\ 3x+y&=10. \end{aligned} $$

First substitute \(x=2\), \(y=3\) into the first equation:

$$ x+2y=2+2(3)=2+6=8. $$

The first equation passes. For the second equation,

$$ 2x-y=2(2)-3=4-3=1. $$

The second equation also passes. Now check the third equation:

$$ 3x+y=3(2)+3=6+3=9. $$

The required right-hand side is \(10\), but the evaluated left-hand side is \(9\). Thus the third equation is false for this tuple, so \((2,3)\) is not a solution of the system. Passing the first two equations does not change that conclusion.

Check: the mismatch is \(9\ne10\), so the third equation itself identifies why this candidate fails.

Substitution and Coefficient Matrices

A system of linear equations can be written using a coefficient matrix. For a system of \(m\) equations in \(n\) ordered variables, let \(\mathbf{A}\in\mathbb{R}^{m\times n}\) contain the coefficients, and let \(\mathbf{b}\in\mathbb{R}^m\) contain the right-hand sides in the same equation order. Write a candidate tuple as the column vector \(\mathbf{x}=\begin{bmatrix}a_1&\cdots&a_n\end{bmatrix}^{\top}\). The matrix product \(\mathbf{A}\mathbf{x}\) lists the evaluated left-hand sides, one per row.

Theorem (Row-by-row matrix test): For a system with coefficient matrix \(\mathbf{A}\) and right-hand-side vector \(\mathbf{b}\), an ordered candidate tuple, written as a column \(\mathbf{x}\), satisfies every equation if and only if \(\mathbf{A}\mathbf{x}=\mathbf{b}\).

Proof. Let row \(i\) of \(\mathbf{A}\) be \((a_{i1},\dots,a_{in})\), and let the \(i\)th entry of \(\mathbf{b}\) be \(b_i\). By the definition of matrix multiplication, entry \(i\) of \(\mathbf{A}\mathbf{x}\) is \(a_{i1}x_1+\cdots+a_{in}x_n\). This is the left-hand side of equation \(i\) after the coefficients are applied to the ordered variables. Thus \(\mathbf{A}\mathbf{x}=\mathbf{b}\) holds exactly when each of its \(m\) entries equals the corresponding \(b_i\), which is exactly when every equation passes substitution. Therefore the candidate satisfies every equation if and only if \(\mathbf{A}\mathbf{x}=\mathbf{b}\). \(\square\)

This matrix form is a compact way to perform the same test, not a different test. Row \(i\) checks equation \(i\); the entries of \(\mathbf{b}\) must remain in the same order as the equations. If a product gives even one entry different from the corresponding entry of \(\mathbf{b}\), the candidate fails that row’s equation.

Worked Example: Check a Three-Variable Candidate by Rows

Use the ordered variables \(x,y,z\). Check whether \((1,-1,-1)\) satisfies the system represented by

$$ \mathbf{A}= \begin{bmatrix} 2&-1&1\\ 1&2&-1\\ -1&1&2 \end{bmatrix}, \qquad \mathbf{b}= \begin{bmatrix} 2\\ 0\\ -4 \end{bmatrix}. $$

The candidate column is \(\mathbf{x}=\begin{bmatrix}1&-1&-1\end{bmatrix}^{\top}\). Multiply each row by this column, showing each entry:

$$ \mathbf{A}\mathbf{x} = \begin{bmatrix} 2(1)+(-1)(-1)+1(-1)\\ 1(1)+2(-1)+(-1)(-1)\\ (-1)(1)+1(-1)+2(-1) \end{bmatrix} = \begin{bmatrix} 2+1-1\\ 1-2+1\\ -1-1-2 \end{bmatrix} = \begin{bmatrix} 2\\ 0\\ -4 \end{bmatrix}. $$

This product equals \(\mathbf{b}\), so the candidate passes all three row checks. In equation form, the evaluations are \(2x-y+z=2\), \(x+2y-z=0\), and \(-x+y+2z=-4\), with \(x=1\), \(y=-1\), and \(z=-1\). Each equals its required right-hand side.

Check: the product is \(\begin{bmatrix}2&0&-4\end{bmatrix}^{\top}\), which matches \(\mathbf{b}\) entry by entry. Therefore the tuple is a solution.

Common Mistakes to Avoid

Changing the variable order. Suppose the ordered variables are \(x,y\), and the candidate is \((2,3)\). A tempting but incorrect check of \(x+2y=8\) is to use \(x=3\), \(y=2\), giving \(3+2(2)=7\), and then declare that the candidate fails. The tuple does not assign \(x=3\), \(y=2\): it assigns \(x=2\), \(y=3\). The correct substitution is \(2+2(3)=8\), so this equation passes. Write the variable order next to the tuple if there is any chance of confusion.

Dropping a negative sign. For \(x-y=1\) and the candidate \((2,3)\) in the order \(x,y\), the correct left-hand side is \(2-3=-1\), not \(2+3=5\). Since \(-1\ne1\), the equation fails. Keep the subtraction sign attached to the variable it precedes.

Checking only one equation. An equation that passes confirms only that this one equation is true for the candidate. To verify a solution, check every equation. To reject a candidate, record at least one equation whose evaluated left-hand side differs from its right-hand side.

A reliable check can be written as a short list: name the equation, substitute the values, simplify the left-hand side, and compare with the right-hand side. Keeping the checks separate makes it easier to find an arithmetic slip and to state precisely which equation accepts or rejects the candidate.

Check Your Understanding

For each question, keep the variables in the stated order and show the substitution arithmetic.

  1. Does \((1,2)\) satisfy both \(x+2y=5\) and \(3x-y=1\)?
  2. For the system \(2x+y=7\), \(x-y=2\), identify whether \((3,1)\) passes each equation.
  3. For variables ordered \(x,y,z\), check whether \((2,-1,1)\) satisfies \(x+y+z=2\), \(2x-y=5\), and \(z-y=2\).
  4. Write the candidate \((1,2)\) as a column and calculate \(\mathbf{A}\mathbf{x}\) for \(\mathbf{A}=\begin{bmatrix}1&2\\3&-1\end{bmatrix}\). Does it equal \(\mathbf{b}=\begin{bmatrix}5\\1\end{bmatrix}\)?
  5. In one sentence, explain why a candidate that passes all but one equation is not a solution of the system.

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon