Solving \( m \times n \) Linear System

\( m \times n \) linear system: (\( m \) equations in \( n \) unknowns)

\[ \begin{cases} a_{11} x_1 + a_{12} x_2 + \cdots + a_{1n} x_n = b_1 \\ a_{21} x_1 + a_{22} x_2 + \cdots + a_{2n} x_n = b_2 \\ \vdots \qquad \vdots \qquad\qquad \vdots \\ a_{m1} x_1 + a_{m2} x_2 + \cdots + a_{mn} x_n = b_m \end{cases} \]

\( \Updownarrow \) In matrix notation: \( A\vec{X} = \vec{B} \)

\[ \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & & & \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_m \end{bmatrix} \]

\( \Updownarrow \) In terms of linear combination: (columns of \( A \))

\[ x_1 \begin{bmatrix} a_{11} \\ a_{21} \\ a_{31} \\ \vdots \\ a_{m1} \end{bmatrix} + x_2 \begin{bmatrix} a_{12} \\ a_{22} \\ a_{32} \\ \vdots \\ a_{m2} \end{bmatrix} + \cdots + x_n \begin{bmatrix} a_{1n} \\ a_{2n} \\ \vdots \\ a_{mn} \end{bmatrix} = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_m \end{bmatrix} \]

For linear system, one and only one of the following cases can occur:

  1. there is a unique (ie. only one) solution;
  2. there are infinitely many solutions;
  3. there is no solution.

In the case of \( 2 \times 2 \) linear system, the above 3 cases correspond to:

(1)

Two lines crossing at one point on x-y axes, labeled only one intersection
Figure 1
Case (1) diagram for a 2 by 2 linear system. Coordinate axes are drawn with vertical and horizontal arrows. Two blue straight lines cross each other at a single point near the origin, marked with a dot. A blue arrow and the label 'only one intersection' point to the crossing point, illustrating a unique solution.

(2)

Two overlapping lines on x-y axes, labeled 2 lines coincide
Figure 2
Case (2) diagram for a 2 by 2 linear system. Coordinate axes are drawn with vertical and horizontal arrows. A red line and a blue line lie directly on top of one another with positive slope, appearing as a single overlapping line. A blue arrow with the label '2 lines coincide' points to them, illustrating infinitely many solutions.

(3)

Two parallel non-intersecting lines on x-y axes
Figure 3
Case (3) diagram for a 2 by 2 linear system. Coordinate axes are drawn with vertical and horizontal arrows. Two blue parallel lines with positive slope run without crossing. A blue arrow and the label '2 unequal parallel lines, no intersection' point to them, illustrating no solution.

Ex1

\[ \begin{cases} 2x + y = -1 \\ x - 3y = 5 \end{cases} \] \[ \left[\begin{array}{cc|c} 2 & 1 & -1 \\ 1 & -3 & 5 \end{array}\right] \rightarrow \left[\begin{array}{cc|c} 1 & -3 & 5 \\ 2 & 1 & -1 \end{array}\right] \rightarrow \left[\begin{array}{cc|c} 1 & -3 & 5 \\ 0 & 7 & -11 \end{array}\right] \]

\( 7y = -11 \Rightarrow y = -\frac{11}{7} \)

\( x - 3y = 5 \)

\[ \begin{gathered} x = 5 + 3y = 5 - \frac{33}{7} = \frac{2}{7} \\[0.5em] \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} \frac{2}{7} \\ -\frac{11}{7} \end{pmatrix} \end{gathered} \]
Graph of two lines intersecting at a unique point in the fourth quadrant
Figure 4
A hand-drawn coordinate graph with a horizontal x-axis and vertical y-axis drawn in black. Two blue lines are plotted: one labeled 2x + y = -1 with a steep negative slope, and another labeled x - 3y = 5 with a gentle positive slope crossing toward the right. The two lines intersect at a single point in the fourth quadrant, labeled with the coordinates \( \left(\frac{2}{7}, -\frac{11}{7}\right) \). A red arrow and red text indicate that the 2 lines intersect at a unique point.

2 lines intersect at a unique point.

Ex2

\[ \begin{cases} x + 2y + z = 1 \\ 3x + y + 4z = 0 \\ 2x + 2y + 3z = 2 \end{cases} \] \[ \left[\begin{array}{ccc|c} 1 & 2 & 1 & 1 \\ 3 & 1 & 4 & 0 \\ 2 & 2 & 3 & 2 \end{array}\right] \rightarrow \left[\begin{array}{ccc|c} 1 & 2 & 1 & 1 \\ 0 & -5 & 1 & -3 \\ 0 & -2 & 1 & 0 \end{array}\right] \] \[ \rightarrow \left[\begin{array}{ccc|c} 1 & 2 & 1 & 1 \\ 0 & 1 & -\frac{1}{5} & \frac{3}{5} \\ 0 & 1 & -\frac{1}{2} & 0 \end{array}\right] \rightarrow \left[\begin{array}{ccc|c} 1 & 2 & 1 & 1 \\ 0 & 1 & -\frac{1}{5} & \frac{3}{5} \\ 0 & 0 & -\frac{3}{10} & -\frac{3}{5} \end{array}\right] \]

\( z = 2 \)

\( y = \frac{3}{5} + \frac{z}{5} = 1 \)

\( x = 1 - 2y - z = 1 - 2 - 2 = -3 \)

\[ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} -3 \\ 1 \\ 2 \end{pmatrix} \]
Three planes in x-y-z axes intersecting at a single point
Figure 5
A three-dimensional sketch showing coordinate axes labeled x, y, and z. Three planes drawn in blue cut through the space and all intersect at a single common point marked near the origin. A red arrow points to this intersection point with the label reading 3 planes intersect at a point. This illustrates the unique solution of the system, corresponding to the point where x equals negative 3, y equals 1, and z equals 2.

3 planes intersect at a point.

Ex3

\( x - 6y = 7 \) \(\longleftarrow\) a line

\( y = s \) (free), \( x = 7 + 6s \)

\[ \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 7 + 6s \\ s \end{pmatrix} = \begin{pmatrix} 7 \\ 0 \end{pmatrix} + s \begin{pmatrix} 6 \\ 1 \end{pmatrix} \]

parametric form   shift   direction of line

Line x - 6y = 7 plotted with shift vector (7,0) and direction vector (6,1)
Figure 6
A graph on x-y axes with a blue vertical y-axis and blue horizontal x-axis. A red straight line with positive slope crosses the x-axis at the point (7,0), labeled in red below the axis. A purple horizontal arrow from the origin points right to (7,0), labeled with the vector (7 over 0), representing the shift. From (7,0) a second purple arrow points up and to the right along the red line, labeled with the vector (6 over 1), representing the direction of the line.

Ex4

\[ \begin{cases} x + 3y = -1 \\ 4x + 12y = -4 \end{cases} \]

2 same lines

\[ \left[\begin{array}{cc|c} 1 & 3 & -1 \\ 4 & 12 & -4 \end{array}\right] \rightarrow \left[\begin{array}{cc|c} 1 & 3 & -1 \\ 0 & 0 & 0 \end{array}\right] \]

\( y = s \) (free)

(pivot) \( x = -1 - 3y = -1 - 3s \)

\[ \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} -1 - 3s \\ s \end{pmatrix} = \begin{pmatrix} -1 \\ 0 \end{pmatrix} + s \begin{pmatrix} 3 \\ 1 \end{pmatrix} \]

parametric form   shift   direction

Two coincident lines on x-y axes with shift vector (-1,0) and direction vector (3,1)
Figure 7
A hand-drawn coordinate graph with a blue vertical y-axis and blue horizontal x-axis. Two red lines lie almost exactly on top of one another, sloping downward from upper left to lower right, representing the two coincident lines of the system. A red point is marked near the origin at approximately (-1, 0). Magenta arrows drawn along the lower line represent the shift vector \( \begin{pmatrix} -1 \\ 0 \end{pmatrix} \) starting from the origin, and the direction vector \( \begin{pmatrix} 3 \\ 1 \end{pmatrix} \) extending along the line to the upper left. The vectors are labeled in magenta with \( \begin{pmatrix} 3 \\ 1 \end{pmatrix} \) and \( \begin{pmatrix} -1 \\ 0 \end{pmatrix} \).

2 same lines

Ex5

\[ \begin{cases} x + 3y = -1 \\ 2x + 6y = 3 \end{cases} \] \[ \left[\begin{array}{cc|c} 1 & 3 & -1 \\ 2 & 6 & 3 \end{array}\right] \rightarrow \left[\begin{array}{cc|c} 1 & 3 & -1 \\ 0 & 0 & 5 \end{array}\right] \]

no solution

\( 0y = 5 \)

Two parallel lines x + 3y = -1 and 2x + 6y = 3 on x-y axes with no intersection
Figure 8
A coordinate plane with a horizontal x-axis and vertical y-axis drawn in black. Two blue lines with negative slope run parallel to each other and do not intersect. The lower line is labeled \( x + 3y = -1 \) and the upper line is labeled \( 2x + 6y = 3 \). A red underlined note reads 2 unequal parallel lines, no intersection, illustrating that the system has no solution.

2 unequal parallel lines, no intersection

Ex6

\[ \begin{cases} x + 3y - z = 5 \\ 2x - y + z = 10 \end{cases} \] \[ \left(\begin{array}{ccc|c} 1 & 3 & -1 & 5 \\ 2 & -1 & 1 & 10 \end{array}\right) \rightarrow \left(\begin{array}{ccc|c} 1 & 3 & -1 & 5 \\ 0 & -7 & 3 & 0 \end{array}\right) \rightarrow \left(\begin{array}{ccc|c} 1 & 3 & -1 & 5 \\ 0 & 1 & -\frac{3}{7} & 0 \end{array}\right) \]

\( z = \alpha \) (free)

\( y = \frac{3}{7} z = \frac{3}{7} \alpha \)

\( x = 5 - 3y + z = 5 - \frac{9}{7}\alpha + \alpha = 5 - \frac{2}{7}\alpha \)

\[ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 5 - \frac{2}{7}\alpha \\ \frac{3}{7}\alpha \\ \alpha \end{pmatrix} = \begin{pmatrix} 5 \\ 0 \\ 0 \end{pmatrix} + \alpha \begin{pmatrix} -\frac{2}{7} \\ \frac{3}{7} \\ 1 \end{pmatrix} \]

parametric form   shift   direction of line

Two planes intersecting in a line through the origin along a direction vector in x-y-z axes
Figure 9
A three-dimensional sketch with x, y, and z axes. Two large planes drawn in blue intersect each other, meeting along a common line. A red line runs through this intersection representing the line of solutions. Purple arrows near the origin mark the shift vector and the direction of the line, showing the two planes intersect in a line.

Ex7

\[ \begin{cases} x - y + 2z = 7 \\ 2x - 2y + 4z = 14 \end{cases} \] \[ \left(\begin{array}{ccc|c} 1 & -1 & 2 & 7 \\ 2 & -2 & 4 & 14 \end{array}\right) \rightarrow \left(\begin{array}{ccc|c} 1 & -1 & 2 & 7 \\ 0 & 0 & 0 & 0 \end{array}\right) \]

\( z = \alpha \) (free)

\( y = \beta \) (free)

\( x = \beta - 2\alpha + 7 \)

\[ \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} 7 + \beta - 2\alpha \\ \beta \\ \alpha \end{pmatrix} = \begin{pmatrix} 7 \\ 0 \\ 0 \end{pmatrix} + \beta \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} + \alpha \begin{pmatrix} -2 \\ 0 \\ 1 \end{pmatrix} \]
Two coincident planes drawn on x-y-z axes with two direction vectors in the plane
Figure 10
A sketch of a three-dimensional coordinate system with a vertical z-axis arrow and two other axis arrows. A single tilted plane is drawn twice, once outlined in red and once in blue, lying almost exactly on top of each other to show that the two planes are the same. From the origin two magenta direction vectors point outward within the plane, representing the two free-parameter direction vectors of the solution. A red label to the upper right reads 2 planes the same, with a red arrow pointing to the overlapping planes.

2 planes the same

Ex8

\[ \begin{cases} x - y + 2z = 7 \\ 3x - 3y + 6z = 2 \end{cases} \] \[ \left(\begin{array}{ccc|c} 1 & -1 & 2 & 7 \\ 3 & -3 & 6 & 2 \end{array}\right) \rightarrow \left(\begin{array}{ccc|c} 1 & -1 & 2 & 7 \\ 0 & 0 & 0 & -19 \end{array}\right) \]

no solution

Two parallel planes on x-y-z axes that do not intersect
Figure 11
A three-dimensional sketch showing coordinate axes (x, y, and z) with two flat planes drawn parallel to each other. The upper plane is outlined in red and the lower plane is outlined in blue. The two planes are separated by a gap and never meet. A red arrow points to the lower blue plane with the label reading 2 unequal, parallel planes, no intersection, illustrating that the system has no solution.

2 unequal, parallel planes, no intersection

Ex9

\[ \begin{cases} x + y - z = 2 \\ 3x - y + 2z = 0 \\ 2x - 2y + 3z = -2 \end{cases} \] \[ \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 3 & -1 & 2 & 0 \\ 2 & -2 & 3 & -2 \end{array}\right) \rightarrow \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & -4 & 5 & -6 \\ 0 & -4 & 5 & -6 \end{array}\right) \] \[ \rightarrow \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & -4 & 5 & -6 \\ 0 & 0 & 0 & 0 \end{array}\right) \rightarrow \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & 1 & -\frac{5}{4} & \frac{3}{2} \\ 0 & 0 & 0 & 0 \end{array}\right) \]

\( z = \alpha \) (free)

\( y = \frac{3}{2} + \frac{5}{4}\alpha \)

\( x = 2 - y + z = 2 - \frac{3}{2} - \frac{5}{4}\alpha + \alpha \)

\[ \begin{gathered} = \frac{1}{2} - \frac{1}{4}\alpha \\[0.5em] \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} \frac{1}{2} - \frac{1}{4}\alpha \\ \frac{3}{2} + \frac{5}{4}\alpha \\ \alpha \end{pmatrix} = \begin{pmatrix} \frac{1}{2} \\ \frac{3}{2} \\ 0 \end{pmatrix} + \alpha \begin{pmatrix} -\frac{1}{4} \\ \frac{5}{4} \\ 1 \end{pmatrix} \end{gathered} \]
Three planes on x-y-z axes intersecting along a common red line
Figure 12
A three-dimensional sketch on x-y-z coordinate axes drawn in black, with the vertical axis pointing up, one axis pointing to the right, and one axis pointing toward the lower left. Three planes are drawn in blue, each shown as a tilted quadrilateral, with dashed blue lines indicating hidden edges. All three planes pass through a single common straight line drawn in red running roughly vertically through the origin region. A red arrow points up toward this line of intersection. Handwritten red text below reads: 3 planes intersect at a line.

3 planes intersect at a line.

Ex10

\[ \begin{cases} x + y - z = 2 \\ 2x - y + 3z = 1 \\ x - 2y + 4z = 0 \end{cases} \] \[ \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 2 & -1 & 3 & 1 \\ 1 & -2 & 4 & 0 \end{array}\right) \rightarrow \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & -3 & 5 & -3 \\ 0 & -3 & 5 & -2 \end{array}\right) \] \[ \rightarrow \left(\begin{array}{ccc|c} 1 & 1 & -1 & 2 \\ 0 & -3 & 5 & -3 \\ 0 & 0 & 0 & 1 \end{array}\right) \]

← no solutions.

Three planes on x-y-z axes intersecting in three parallel lines with no common intersection
Figure 13
A three-dimensional sketch on black x-y-z coordinate axes. Three blue planes are drawn cutting through space. Their pairwise intersections form three thick blue parallel line segments running in the same direction, none of which meet at a common point. Red curved arrows point to these segments and are labeled '3 parallel lines'. A caption below states the three planes form three parallel lines with no common intersection.

3 parallel lines

3 planes forming 3 parallel lines with no common intersection.