From a Matrix Equation to Scalar Equations
A matrix equation \( \mathbf{A}\mathbf{x}=\mathbf{b} \) is a compact way to write several scalar equations at once. To read it accurately, keep three positions aligned: row \(i\) supplies equation \(i\), column \(j\) supplies the coefficient of variable \(x_j\), and entry \(b_i\) supplies that equation’s right-hand side. This tutorial focuses on reading that correspondence, not on finding values of the variables.
Work over \(\mathbb{R}\). Let \(\mathbf{A}\in\mathbb{R}^{m\times n}\), let \(\mathbf{x}=(x_1,\dots,x_n)^{\top}\in\mathbb{R}^n\), and let \(\mathbf{b}=(b_1,\dots,b_m)^{\top}\in\mathbb{R}^m\). The product \(\mathbf{A}\mathbf{x}\) has \(m\) coordinates. In coordinate \(i\), the entries in row \(i\) are multiplied, in order, by \(x_1,\dots,x_n\) and added. Thus the \(i\)-th coordinate is \(a_{i1}x_1+\cdots+a_{in}x_n\).
The number of rows determines the number of scalar equations; the number of columns determines the number of variables in \(\mathbf{x}\). These counts need not be equal. When reading a row, include the variables in column order. A zero entry contributes a zero coefficient, so its term can be omitted from the written equation, but the variables that remain must keep their column labels.
The Row-to-Equation Correspondence
Proof. By the definition of matrix-vector multiplication, the \(i\)-th coordinate of \(\mathbf{A}\mathbf{x}\) is \(\sum_{j=1}^{n}a_{ij}x_j\). Two vectors in \(\mathbb{R}^m\) are equal if and only if their corresponding coordinates are equal. Therefore, if \(\mathbf{A}\mathbf{x}=\mathbf{b}\), coordinate \(i\) gives \(\sum_{j=1}^{n}a_{ij}x_j=b_i\) for every \(i\). Conversely, if all \(m\) scalar equations hold, then every coordinate of \(\mathbf{A}\mathbf{x}\) equals the corresponding coordinate of \(\mathbf{b}\), so the vectors are equal. \(\square\)
This result accounts for both directions of the translation: expanding the product gives the equations, and requiring all those equations gives the original vector equality. The index \(i\) tracks a row and an equation; the index \(j\) tracks a column and a variable. Mixing those roles is a common source of errors.
An \(m\times n\) matrix produces \(m\) scalar equations in the \(n\) entries of \(\mathbf{x}\).
In row \(i\), pair \(a_{i1}\) with \(x_1\), \(a_{i2}\) with \(x_2\), and continue through \(a_{in}\) with \(x_n\).
Set the sum from row \(i\) equal to \(b_i\), not to an entry from a different row.
Recompute the coordinates of \(\mathbf{A}\mathbf{x}\); they must reproduce the left-hand sides in the same order.
Worked Examples
Worked Example: Three Rows and Three Variables
Read the scalar equations represented by
The matrix has three rows and three columns, so the equation represents three scalar equations in \(x_1,x_2,x_3\). Row 1 has entries \(2,-1,3\), which pair with \(x_1,x_2,x_3\) respectively; its right-hand side is \(7\). Row 2 gives the second equation and uses the second entry of \(\mathbf{b}\), namely \(-6\). Row 3 gives the third equation and uses \(1\).
The zero terms may be omitted, giving \(4x_2+5x_3=-6\) in the second equation and \(-2x_1+x_2=1\) in the third. The variables are still assigned by column: the \(4\) multiplies \(x_2\), and the \(-2\) multiplies \(x_1\).
Check: Multiplying row by row gives $$ \mathbf{A}\mathbf{x} = \begin{bmatrix} 2x_1+(-1)x_2+3x_3\\ 0x_1+4x_2+5x_3\\ (-2)x_1+1x_2+0x_3 \end{bmatrix} = \begin{bmatrix} 2x_1-x_2+3x_3\\ 4x_2+5x_3\\ -2x_1+x_2 \end{bmatrix}. $$ These are exactly the three left-hand sides, in order, and equating them to the coordinates \(7,-6,1\) reproduces the scalar equations.
Worked Example: A Rectangular Matrix with Four Variables
Read the scalar equations represented by this \(2\times4\) matrix equation:
There are two rows, so there are two equations. There are four columns, so the variables are \(x_1,x_2,x_3,x_4\). In row 1, the coefficients are \(1,0,-3,2\), in that order. In row 2, they are \(0,5,1,0\). Pair each row with the corresponding entry of the right-hand-side vector:
Omitting the zero terms and writing coefficients of \(1\) without the numeral gives $$ \begin{aligned} x_1-3x_3+2x_4&=4,\\ 5x_2+x_3&=-2. \end{aligned} $$ There is no \(x_2\) term in the first equation and no \(x_1\) or \(x_4\) term in the second, because the corresponding matrix entries are zero.
Check: The row products are \(1x_1+0x_2+(-3)x_3+2x_4=x_1-3x_3+2x_4\) and \(0x_1+5x_2+1x_3+0x_4=5x_2+x_3\). Hence $$ \mathbf{A}\mathbf{x} = \begin{bmatrix}x_1-3x_3+2x_4\\5x_2+x_3\end{bmatrix}, $$ which matches both left-hand sides and their order.
Worked Example: A Zero Row and an All-Zero Equation
Read every equation represented by $$ \begin{bmatrix} 1&2\\ -3&0\\ 0&0\\ 5&-1 \end{bmatrix} \begin{bmatrix}x_1\\x_2\end{bmatrix} = \begin{bmatrix}3\\6\\0\\-12\end{bmatrix}. $$ The matrix has four rows and two columns, so the result is four equations in two variables. Read each row alongside the entry of \(\mathbf{b}\) in the same position:
The third row contains only zeros, and its matching right-hand side is also zero, so the third equation is \(0=0\). It still comes from a row of the matrix; it has not been paired with a different entry of \(\mathbf{b}\). The fourth row gives \(5x_1-x_2=-12\), because its entries are \(5,-1\) and its right-hand side is the fourth entry, \(-12\).
Check: Computing each row product gives \(1x_1+2x_2=x_1+2x_2\), \((-3)x_1+0x_2=-3x_1\), \(0x_1+0x_2=0\), and \(5x_1+(-1)x_2=5x_1-x_2\). Thus $$ \mathbf{A}\mathbf{x} = \begin{bmatrix} x_1+2x_2\\ -3x_1\\ 0\\ 5x_1-x_2 \end{bmatrix}, $$ and setting these coordinates equal to \(3,6,0,-12\), respectively, gives exactly the four equations above.
What Zero Entries and Rows Tell You
Proof. If row \(i\) is zero, then \(a_{ij}=0\) for every \(j=1,\dots,n\). The left-hand side of equation \(i\) is therefore \(\sum_{j=1}^{n}0x_j=0\), so the equation is \(0=b_i\). If column \(j\) is zero, then \(a_{ij}=0\) for every \(i=1,\dots,m\). In each equation \(i\), the term associated with \(x_j\) is \(a_{ij}x_j=0x_j=0\). Thus \(x_j\) has zero coefficient in every equation. \(\square\)
The proposition describes what the entries contribute to the written equations; it does not require solving them. In particular, the zero-row equation must retain its own right-hand-side entry. It is \(0=b_i\), not automatically \(0=0\); only when \(b_i=0\) does it read \(0=0\).
A Common Indexing Mistake
Consider $$ \begin{bmatrix}2&1\\-1&3\end{bmatrix} \begin{bmatrix}x_1\\x_2\end{bmatrix} = \begin{bmatrix}5\\4\end{bmatrix}. $$ A common incorrect reading is $$ \begin{aligned} 2x_1+x_2&=5,\\ -x_1+3x_2&=5. \end{aligned} $$ The second equation has mistakenly used the first right-hand-side entry again. The correction is to pair row 2 with \(b_2=4\): $$ \begin{aligned} 2x_1+x_2&=5,\\ -x_1+3x_2&=4. \end{aligned} $$ The check is $$ \begin{bmatrix}2&1\\-1&3\end{bmatrix} \begin{bmatrix}x_1\\x_2\end{bmatrix} = \begin{bmatrix}2x_1+x_2\\-x_1+3x_2\end{bmatrix}. $$ The second coordinate is paired with \(4\), not \(5\). Keep the row index fixed while reading both the matrix entries and the right-hand side.
A separate, related error is to attach a coefficient to the wrong variable. In an \(m\times n\) matrix, entry \(a_{ij}\) multiplies \(x_j\): the column index, not the row index, chooses the variable. Reading every row from left to right and labeling its terms \(x_1,\dots,x_n\) prevents this mistake.
Check Your Understanding
For each question, keep row order and column order explicit. You are asked to read or check equations, not to solve them.
- Write the scalar equations represented by \(\begin{bmatrix}3&-2\\1&0\\4&5\end{bmatrix}\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}6\\0\\-1\end{bmatrix}\).
- How many scalar equations and how many variables occur in \(\mathbf{A}\mathbf{x}=\mathbf{b}\) when \(\mathbf{A}\in\mathbb{R}^{3\times5}\)?
- In a matrix with four columns, which variable is multiplied by the entry in row 2, column 4?
- What scalar equation comes from a zero third row when \(b_3=7\)?
- Multiply \(\begin{bmatrix}0&-1&2\end{bmatrix}\) by \(\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix}\) and write the resulting scalar expression.