Combining Matrices with Scalars
Matrix addition and scalar multiplication let us build new matrices from existing ones. A linear combination is a sum of scalar multiples of matrices. It is defined entry by entry, so the matrices being combined must have the same dimensions. This makes calculations manageable: each position in the result is found from the entries in that same position in the original matrices.
Throughout this tutorial, the matrices have real entries. Suppose \(\mathbf{A}_1,\ldots,\mathbf{A}_p\) all belong to \(\mathbb{R}^{m\times n}\), where \(p,m,n\in\mathbb{N}\). The scalars \(c_1,\ldots,c_p\) are real numbers. The same dimensions matter: the sum \(c_1\mathbf{A}_1+\cdots+c_p\mathbf{A}_p\) is defined because scalar multiplication preserves a matrix’s dimensions and addition is defined for matrices of matching dimensions.
To calculate the combination, multiply every entry of each matrix by its scalar, then add the resulting entries at matching positions. In particular, the entry in row \(i\), column \(j\) of the result is the same linear combination of the entries in row \(i\), column \(j\) of the original matrices. Write \(a_{ij}^{(k)}\) for the entry in position \((i,j)\) of \(\mathbf{A}_k\).
Proof. We use the definitions of scalar multiplication and matrix addition, which calculate each entry separately. For \(p=1\), the \((i,j)\) entry of \(c_1\mathbf{A}_1\) is \(c_1a_{ij}^{(1)}\), as claimed. Suppose the formula holds for a combination of \(p-1\) matrices. Adding \(c_p\mathbf{A}_p\) to that combination adds \(c_pa_{ij}^{(p)}\) to its entry in position \((i,j)\). Thus the resulting entry is \(\sum_{k=1}^{p-1}c_ka_{ij}^{(k)}+c_pa_{ij}^{(p)}=\sum_{k=1}^{p}c_ka_{ij}^{(k)}\). Each operation preserves the shared dimensions \(m\times n\). This proves the formula for every positive integer \(p\). \(\square\)
Calculating a Linear Combination
Worked Example: A Combination of Two Matrices
Calculate \(2\mathbf{A}-3\mathbf{B}\) for
Both matrices are \(2\times2\), so the combination is defined. First multiply each matrix by its scalar:
Now add corresponding entries:
Check: The entry formula gives, for example, the entry in position \((2,1)\) as \(2(0)-3(-1)=3\), and the entry in position \((1,2)\) as \(2(-2)-3(1)=-7\). These agree with the computed matrix.
When the coefficients are unknown, compare the target matrix with the proposed combination one entry at a time. Matrix equality means that corresponding entries are equal. Thus one matrix equation becomes a collection of scalar equations, one for each position.
Proof. Suppose first that \(c_1\mathbf{A}_1+\cdots+c_p\mathbf{A}_p=\mathbf{B}\). Equal matrices have equal entries in every position. By the entry formula, the entry in position \((i,j)\) on the left is \(\sum_{k=1}^{p}c_ka_{ij}^{(k)}\); the entry there on the right is \(b_{ij}\). Therefore the stated scalar equation holds for every \(i,j\). Conversely, suppose those scalar equations hold for every \(i,j\). The entry formula says that the \((i,j)\) entry of the proposed combination is \(\sum_{k=1}^{p}c_ka_{ij}^{(k)}\), which equals \(b_{ij}\) by assumption. So the combination and \(\mathbf{B}\) have equal entries in every position. By the definition of matrix equality, they are equal. \(\square\)
Solving for Unknown Coefficients
Worked Example: A Unique Set of Coefficients
Find real numbers \(x,y,z\) such that \(x\mathbf{A}_1+y\mathbf{A}_2+z\mathbf{A}_3=\mathbf{B}\), where
Compare corresponding entries. The \((1,1)\) entry gives \(x=2\). The \((1,2)\) entry gives \(y=3\), and the \((2,1)\) entry gives \(y=3\) again. The \((2,2)\) entry gives \(z=5\). The coefficient values satisfy every equation, so the solution is \(x=2,\ y=3,\ z=5\).
Check: Substituting those values into the combination gives
Each coefficient is fixed by an entry equation, so there is no other solution.
The entry equations need not always determine every coefficient uniquely. Some equations may repeat information, leaving choices for the coefficients. In another case, the equations may contradict one another, so no coefficients can produce the target. These possibilities are visible by checking all positions, not just some of them.
Worked Example: More Than One Choice of Coefficients
Find \(x,y\in\mathbb{R}\) such that \(x\mathbf{C}_1+y\mathbf{C}_2=\mathbf{D}\), where
The combination and target are
Matching entries gives the same equation twice: \(x+2y=3\). Let \(y=t\), where \(t\in\mathbb{R}\) is arbitrary. Then \(x=3-2t\). Hence all solutions are \((x,y)=(3-2t,t)\) for \(t\in\mathbb{R}\).
Check: For any real \(t\),
Thus every parameter value gives a valid combination, rather than one unique pair.
Worked Example: No Coefficients Can Produce the Target
Determine whether there are real \(x,y\) satisfying \(x\mathbf{D}_1+y\mathbf{D}_2=\mathbf{E}\), where
For any \(x,y\), the combination is
The \((1,1)\) entry of the target requires \(x=1\), and its \((1,2)\) entry requires \(y=0\). But the \((2,2)\) entry of every possible combination is \(0\), while the \((2,2)\) entry of \(\mathbf{E}\) is \(1\). That entry would require \(0=1\), which is impossible. There is no solution.
Check: For the values forced by the first row, \(x\mathbf{D}_1+y\mathbf{D}_2=\begin{bmatrix}1&0\\0&0\end{bmatrix}\), which differs from \(\mathbf{E}\) in position \((2,2)\).
Common Pitfalls
Do not match entries in different positions. A tempting but incorrect calculation is to combine the entries of two matrices by taking a row from one and a column from the other. For example, suppose \(\mathbf{A}=\begin{bmatrix}1&2\\3&4\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}5&6\\7&8\end{bmatrix}\). The \((1,2)\) entry of \(2\mathbf{A}-\mathbf{B}\) is not \(2(1)-6\): that mistakenly uses the \((1,1)\) entry of \(\mathbf{A}\). The correct calculation uses the \((1,2)\) entries in both matrices: \(2(2)-6=-2\). In fact,
Check: The four entries are \(2(1)-5=-3\), \(2(2)-6=-2\), \(2(3)-7=-1\), and \(2(4)-8=0\), in their original positions.
Check every entry when solving for coefficients. A candidate that matches the first row is not necessarily a solution of the matrix equation; the remaining rows and columns impose their own conditions. Also check that all matrices involved have matching dimensions before adding them. A linear combination is formed by scalar multiplication and matrix addition, so incompatible matrix dimensions do not define the proposed sum.
In applications, linear combinations express a matrix as a weighted sum of given matrices. The entry formula provides a direct way to find the weights: write one scalar equation for every matrix position, solve the resulting equations, and substitute the proposed coefficients back into the combination. The equations may determine one set of weights, allow many choices, or reveal that no such combination exists.
Check Your Understanding
Use the entry formula and check proposed coefficient values by substitution.
- Calculate \(3\mathbf{A}-2\mathbf{B}\) for \(\mathbf{A}=\begin{bmatrix}1&-1\\2&0\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}0&2\\-1&3\end{bmatrix}\).
- Find \(x,y\) such that \(x\begin{bmatrix}1&0\\0&0\end{bmatrix}+y\begin{bmatrix}0&0\\0&1\end{bmatrix}=\begin{bmatrix}4&0\\0&-2\end{bmatrix}\).
- For which real numbers \(x,y\) does \(x\begin{bmatrix}1&1\\0&0\end{bmatrix}+y\begin{bmatrix}0&0\\1&1\end{bmatrix}=\begin{bmatrix}2&2\\3&3\end{bmatrix}\)?
- Can any linear combination of \(\begin{bmatrix}1&0\\0&0\end{bmatrix}\) and \(\begin{bmatrix}0&1\\0&0\end{bmatrix}\) equal \(\begin{bmatrix}0&0\\1&0\end{bmatrix}\)? Explain using an entry equation.