Several Right-Hand Sides, One Coefficient Matrix
Suppose several systems have the same coefficient matrix but different right-hand sides. Solving each system separately repeats work: the coefficients are unchanged, so the elimination steps needed to simplify them are unchanged too. If the coefficient matrix is invertible, its inverse gives a direct way to reuse that work. Arrange the right-hand sides as columns of one matrix, multiply once by the inverse, and read the individual solutions from the resulting columns.
Let \(\mathbf{A}\) be an invertible \(n\times n\) matrix, and let \(\mathbf{b}_1,\dots,\mathbf{b}_k\) be right-hand sides in \(\mathbb{R}^n\). Put those right-hand sides into the columns of \(\mathbf{B}\in\mathbb{R}^{n\times k}\). The systems \(\mathbf{A}\mathbf{x}_j=\mathbf{b}_j\) can then be gathered into one matrix equation. This works because the \(j\)-th column of a matrix product \(\mathbf{A}\mathbf{X}\) is \(\mathbf{A}\) times the \(j\)-th column of \(\mathbf{X}\).
The Inverse Method and Why It Works
Writing all systems together gives \(\mathbf{A}\mathbf{X}=\mathbf{B}\). When \(\mathbf{A}\) is invertible, multiply on the left by \(\mathbf{A}^{-1}\). The order matters: the inverse is placed to the left of \(\mathbf{B}\), because it cancels \(\mathbf{A}\) in the product \(\mathbf{A}^{-1}\mathbf{A}\).
Proof. Set \(\mathbf{X}=\mathbf{A}^{-1}\mathbf{B}\). Then associativity of matrix multiplication and the definition of the inverse give \(\mathbf{A}\mathbf{X}=\mathbf{A}(\mathbf{A}^{-1}\mathbf{B})=(\mathbf{A}\mathbf{A}^{-1})\mathbf{B}=\mathbf{I}_n\mathbf{B}=\mathbf{B}\). Thus this \(\mathbf{X}\) is a solution. To prove uniqueness, suppose \(\mathbf{Y}\) is any other solution, so \(\mathbf{A}\mathbf{Y}=\mathbf{B}\). Multiplying on the left by \(\mathbf{A}^{-1}\) gives \(\mathbf{Y}=\mathbf{A}^{-1}(\mathbf{A}\mathbf{Y})=(\mathbf{A}^{-1}\mathbf{A})\mathbf{Y}=\mathbf{I}_n\mathbf{Y}=\mathbf{Y}\), and, using \(\mathbf{A}\mathbf{Y}=\mathbf{B}\), this is \(\mathbf{Y}=\mathbf{A}^{-1}\mathbf{B}=\mathbf{X}\). Finally, the \(j\)-th column of \(\mathbf{A}\mathbf{X}\) is \(\mathbf{A}\mathbf{x}_j\), and the \(j\)-th column of \(\mathbf{B}\) is \(\mathbf{b}_j\). Equality of the matrices therefore gives \(\mathbf{A}\mathbf{x}_j=\mathbf{b}_j\) for each \(j\). The unique matrix solution gives the unique solution for each system. \(\square\)
Worked Example: One Inverse for Two Systems
Use one inverse to solve \(\mathbf{A}\mathbf{x}_1=\mathbf{b}_1\) and \(\mathbf{A}\mathbf{x}_2=\mathbf{b}_2\), where
The columns of \(\mathbf{B}\) are \(\mathbf{b}_1=\begin{bmatrix}5\\13\end{bmatrix}\) and \(\mathbf{b}_2=\begin{bmatrix}3\\8\end{bmatrix}\). The inverse is \(\mathbf{A}^{-1}=\begin{bmatrix}-5&2\\3&-1\end{bmatrix}\). Check it before using it:
Now multiply the inverse by both right-hand sides at once:
The first solution is the first column, \(\mathbf{x}_1=\begin{bmatrix}1\\2\end{bmatrix}\), and the second is \(\mathbf{x}_2=\begin{bmatrix}1\\1\end{bmatrix}\). Check each in its original system:
Because \(\mathbf{A}\) is invertible, the theorem also guarantees that these verified solutions are unique.
Using Row Reduction on All Right-Hand Sides
The inverse multiplication is not the only way to solve the collection. Form one augmented matrix by placing every right-hand side beside the coefficient matrix: \([\mathbf{A}\mid\mathbf{B}]\). Row-reduce the coefficient block to \(\mathbf{I}_n\), applying each row operation to the entire augmented matrix. The block on the right then contains all the solutions.
This is the same row-operation idea used to compute an inverse from \([\mathbf{A}\mid\mathbf{I}_n]\), except the block on the right starts as \(\mathbf{B}\), not \(\mathbf{I}_n\). The justification is that a row operation changes every right-hand side consistently, just as it changes the coefficient matrix. When the coefficient block becomes the identity, each column of the right block is the corresponding solution.
Proof. Each elementary row operation is left multiplication by an elementary matrix. If the operations, in order, correspond to \(\mathbf{E}_1,\dots,\mathbf{E}_r\), their combined effect is left multiplication by \(\mathbf{P}=\mathbf{E}_r\cdots\mathbf{E}_1\). Consequently the final blocks satisfy \(\mathbf{P}\mathbf{A}=\mathbf{I}_n\) and \(\mathbf{P}\mathbf{B}=\mathbf{C}\). Since \(\mathbf{A}\) is invertible, \(\mathbf{P}=\mathbf{P}\mathbf{I}_n=\mathbf{P}(\mathbf{A}\mathbf{A}^{-1})=(\mathbf{P}\mathbf{A})\mathbf{A}^{-1}=\mathbf{I}_n\mathbf{A}^{-1}=\mathbf{A}^{-1}\). Substituting this into \(\mathbf{P}\mathbf{B}=\mathbf{C}\) gives \(\mathbf{C}=\mathbf{A}^{-1}\mathbf{B}\), as required. \(\square\)
Worked Example: Row-Reduce Two Right-Hand Sides Together
Solve both systems with \(\mathbf{A}=\begin{bmatrix}2&1\\1&1\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}5&2\\3&1\end{bmatrix}\) by row-reducing the augmented matrix. The first row reduction swaps rows, the second subtracts twice the new first row from the second, and the remaining operations scale the second row by \(-1\) and clear above its pivot:
The left block is now the identity, so the solution columns are \(\mathbf{x}_1=\begin{bmatrix}2\\1\end{bmatrix}\) and \(\mathbf{x}_2=\begin{bmatrix}1\\0\end{bmatrix}\). Check them by multiplication:
Each product gives the matching column of \(\mathbf{B}\). The theorem explains why the final right block is the same matrix that would result from computing \(\mathbf{A}^{-1}\mathbf{B}\).
Compare the Two Approaches
Both methods use the same underlying row operations. Their practical difference is where the right-hand sides enter the calculation:
- Compute the inverse first: reduce \([\mathbf{A}\mid\mathbf{I}_n]\) to obtain \(\mathbf{A}^{-1}\), then multiply \(\mathbf{A}^{-1}\mathbf{B}\). This is useful when the same coefficient matrix will be used with further right-hand sides.
- Reduce the combined augmented matrix: row-reduce \([\mathbf{A}\mid\mathbf{B}]\) directly. This gives the requested solutions without separately displaying the full inverse.
For a single right-hand side, writing it as a one-column matrix changes nothing mathematically. For several right-hand sides, the matrix form makes the shared work visible. In either approach, the coefficient matrix must be square and invertible for the inverse method and for reduction of its left block to the identity. If \(\mathbf{A}\) is not invertible, the expression \(\mathbf{A}^{-1}\mathbf{B}\) is unavailable; the systems must instead be examined by methods appropriate to their consistency and solution sets.
Common Pitfall: Reversing the Multiplication Order
A frequent error is to multiply \(\mathbf{B}\mathbf{A}^{-1}\) instead of \(\mathbf{A}^{-1}\mathbf{B}\). Even when both products are defined, they generally differ, and the wrong order does not solve \(\mathbf{A}\mathbf{X}=\mathbf{B}\). For the first example, the incorrect order gives
This cannot be the solution matrix: multiplying it on the left by \(\mathbf{A}\) gives
The correction follows directly from the equation: to cancel the left factor \(\mathbf{A}\) in \(\mathbf{A}\mathbf{X}=\mathbf{B}\), multiply both sides on the left by \(\mathbf{A}^{-1}\). This yields \(\mathbf{X}=\mathbf{A}^{-1}\mathbf{B}\), not \(\mathbf{B}\mathbf{A}^{-1}\).
Check Your Understanding
Use the equation and the column interpretation to justify your answers.
- If \(\mathbf{A}\) is an invertible \(3\times3\) matrix and \(\mathbf{B}\) is \(3\times4\), what are the dimensions of \(\mathbf{A}^{-1}\mathbf{B}\)?
- Explain why the \(j\)-th column of \(\mathbf{A}^{-1}\mathbf{B}\) solves the system with right-hand side \(\mathbf{b}_j\).
- For an invertible \(\mathbf{A}\), what must be true of the left block after row-reducing \([\mathbf{A}\mid\mathbf{B}]\) to read off solutions?
- For \(\mathbf{A}=\begin{bmatrix}1&1\\0&1\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}3&1\\2&4\end{bmatrix}\), find \(\mathbf{A}^{-1}\mathbf{B}\) and check both solution columns.
- Why does \(\mathbf{B}\mathbf{A}^{-1}\) not generally solve \(\mathbf{A}\mathbf{X}=\mathbf{B}\)?