Lesson Explainer: Matrix Operations Mathematics

In this explainer, we will learn how to combine the operations of addition, subtraction, scalar multiplication, and transposing matrices.

Once a matrix has been defined, there are many operations that can be performed on it. At the simplest level, two matrices of equal dimension can be combined with two of the most familiar mathematical tools: addition and subtraction. There is also the action of scalar multiplication performed on a matrix, to some extent mimicking our conventional understanding of multiplication. These operations alone would be enough to endow linear algebra with properties that are interesting enough to warrant a full analysis and discussion. The operation of transposition, in itself an apparently inert concept, can also be combined with addition, subtraction, and scalar multiplication to produce algebraic structures that are far richer than conventional algebra. This explainer will explore all of these operations and the ways in which they can be combined and utilized.

At this stage, it is worth noting that other operations exist in linear algebra, such as matrix exponentiation and inversion, which make their own significant contributions to this field. Equally, the introduction of concepts such as the determinant and the trace can be combined with this understanding, each producing a related algebraic structure that interacts with all of the operations that we have previously described. Although such ideas are beyond the scope of this explainer, please be aware that the definitions, theorems, and examples below are only part of a much larger picture.

Definition: Matrix Addition and Subtraction

Consider two matrices 𝐴 and 𝐡, both having order π‘šΓ—π‘› and being described by the expressions 𝐴=(π‘Ž),𝐡=𝑏.

The matrix 𝐢=𝐴+𝐡 is then created by adding the two matrices entry by entry. In other words, if 𝐢=(𝑐), then 𝑐=π‘Ž+𝑏.

Similarly, subtraction is also performed entry by entry. If 𝐷=π΄βˆ’π΅ and we define 𝐷=𝑑, then 𝑑=π‘Žβˆ’π‘.

The first point to note is that 𝐴 and 𝐡 can only be combined using addition or subtraction if they have the same order. If we had the matrices 𝐴=5βˆ’3βˆ’230βˆ’3,𝐡=ο€Ό031βˆ’12103, then there would be no way to combine them using either addition or subtraction. This is because 𝐴 has 3 rows and 2 columns, whereas 𝐡 has 2 rows and 4 columns.

Now we consider two new matrices: 𝐴=ο€Ό503βˆ’2βˆ’3βˆ’3,𝐡=ο€Ό31βˆ’1103.

These matrices both have 2 rows and 3 columns and so can be combined using either addition or subtraction. To add the two matrices, we work entry by entry: 𝐴+𝐡=ο€Ό503βˆ’2βˆ’3βˆ’3+ο€Ό31βˆ’1103=ο€½5+30+13+(βˆ’1)βˆ’2+1βˆ’3+0βˆ’3+3=ο€Ό812βˆ’1βˆ’30.

Subtraction is also completed entry-by-entry: π΄βˆ’π΅=ο€Ό503βˆ’2βˆ’3βˆ’3οˆβˆ’ο€Ό31βˆ’1103=ο€½5βˆ’30βˆ’13βˆ’(βˆ’1)βˆ’2βˆ’1βˆ’3βˆ’0βˆ’3βˆ’3=ο€Ό2βˆ’14βˆ’3βˆ’3βˆ’6.

We will now practice one example of this.

Example 1: Addition of Matrices

Evaluate ο€Ό811βˆ’37+ο€Ό10βˆ’131.


Working entry by entry, we have that ο€Ό811βˆ’37+ο€Ό10βˆ’131=ο€½8+1011+(βˆ’1)βˆ’3+37+1=ο€Ό181008.

Although we were not asked to calculate it, we could also show that ο€Ό811βˆ’37οˆβˆ’ο€Ό10βˆ’131=ο€½8βˆ’1011βˆ’(βˆ’1)βˆ’3βˆ’37βˆ’1=ο€Όβˆ’212βˆ’66.

The operations of addition and subtraction appear relatively innocuous when in isolation, and it is seldom the case that adding or subtracting two matrices will be interesting in itself. Instead, it is more likely that these operations will be combined with other, different operations. One of the most common is the matrix transpose, which we now define.

Definition: Matrix Transpose

Consider a matrix 𝐴 with π‘š rows and 𝑛 columns, which is specified by the formula 𝐴=(π‘Ž).

Then, the matrix β€œtranspose” 𝐴 is a matrix with 𝑛 rows and π‘š columns that is calculated from the elements of 𝐴 by the formula 𝐴=(π‘Ž).οŒ³ο…οƒ

The original matrix 𝐴 has order π‘šΓ—π‘› and the matrix transpose 𝐴 has order π‘›Γ—π‘š.

Matrix transposition is usually thought of as β€œswitching the rows for the columns” or β€œflipping along the diagonal entries.” Both of these concepts are equivalent and can be demonstrated by example. Consider the matrix 𝐴=ο€Ό55030βˆ’2βˆ’3βˆ’3, which is of order 2Γ—4. The matrix transpose, 𝐴, will therefore be of order 4Γ—2: 𝐴=οƒβˆ—βˆ—βˆ—βˆ—βˆ—βˆ—βˆ—βˆ—ο, where the βˆ— entries represent quantities that we have not yet calculated.

To populate the entries of this matrix, we take the first row of 𝐴 and write these entries in order as the first column of 𝐴, as shown: 𝐴=ο€Ό55030βˆ’2βˆ’3βˆ’3,𝐴=βŽ›βŽœβŽœβŽ5βˆ—5βˆ—0βˆ—3βˆ—βŽžβŽŸβŽŸβŽ .

To populate the remaining entries, we now take the second row of 𝐴 and write the entries in order as the second column of 𝐴: 𝐴=ο€Ό55030βˆ’2βˆ’3βˆ’3,𝐴=βŽ›βŽœβŽœβŽ505βˆ’20βˆ’33βˆ’3⎞⎟⎟⎠.

Given the two matrices above, we can now see why we might describe the operation of transposition as switching the rows with the columns. We can also take both of these matrices and highlight only the diagonal entries: 𝐴=ο€Ό55030βˆ’2βˆ’3βˆ’3,𝐴=βŽ›βŽœβŽœβŽ505βˆ’20βˆ’33βˆ’3⎞⎟⎟⎠.

We can see that π‘Ž=π‘Ž=5 and π‘Ž=π‘Ž=βˆ’2. Given that the diagonal entries are unchanged, we can now see why we have claimed to have β€œflipped” around these entries when transposing the original matrix.

Example 2: Transpose of a Matrix

Given that 𝐴=ο€Όβˆ’26βˆ’6184, find 𝐴.


Since 𝐴 is of order 2Γ—3, the transpose 𝐴 will be of order 3Γ—2, hence having the form 𝐴=ο€Ώβˆ—βˆ—βˆ—βˆ—βˆ—βˆ—ο‹.

The diagonal entries will remain unchanged, giving 𝐴=ο€Όβˆ’26βˆ’6184,𝐴=ο€βˆ’2βˆ—βˆ—8βˆ—βˆ—οŒ.

We then write the first row of 𝐴 as the first column of 𝐴: 𝐴=ο€Όβˆ’26βˆ’6184,𝐴=ο€βˆ’2βˆ—68βˆ’6βˆ—οŒ.

Finally, we write the second row of 𝐴 as the second column of 𝐴: 𝐴=ο€Όβˆ’26βˆ’6184,𝐴=ο€βˆ’2168βˆ’64.

In this explainer, we have already seen how matrix addition is only possible between two matrices if they have the same order, which can be combined with the knowledge that matrix transposition will take a matrix of order π‘šΓ—π‘› and produce a matrix of order π‘›Γ—π‘š. Unless π‘š=𝑛, which would give a β€œsquare” matrix, the order of a matrix is different from the order of its transpose. Both of these ideas are covered in the following question.

Example 3: Addition and Transposition of Matrices

Given that 𝐴=ο€Όβˆ’7575βˆ’98,𝐡=7βˆ’53βˆ’51βˆ’4, find π΄βˆ’π΅οŒ³, if possible.


The matrix 𝐴 is of order 2Γ—3 and the matrix 𝐡 is of order 3Γ—2. We know that the order of 𝐡 will therefore be 2Γ—3, which is the same as the order of 𝐴, meaning that these two matrices can be combined using addition (or subtraction). We calculate that 𝐡=ο€Ό731βˆ’5βˆ’5βˆ’4, which gives π΄βˆ’π΅=ο€Όβˆ’7575βˆ’98οˆβˆ’ο€Ό731βˆ’5βˆ’5βˆ’4=ο€½βˆ’7βˆ’75βˆ’37βˆ’15βˆ’(βˆ’5)βˆ’9βˆ’(βˆ’5)8βˆ’(βˆ’4)=ο€Όβˆ’142610βˆ’412.

Frequently, when working with conventional algebra, we are asked to find an unknown quantity from a given equation. The same question can be asked when working with linear algebra, although there are more possible operations that may be involved, such as transposition.

Example 4: Solving Matrix Equations with Addition and Transposition

Given that 𝐴=ο€βˆ’59710βˆ’20637,(𝐴+𝐡)=ο€βˆ’13211243417βˆ’36, determine the matrix 𝐡.


Note that 𝐴 is of order 3Γ—3 which means that 𝐡 must also be of order 3Γ—3, as otherwise the sum 𝐴+𝐡 would not be possible.

We can also recall the property that, for a matrix 𝐢, taking the transpose of the matrix twice will return the original matrix 𝐢. In other words, 𝐢=𝐢. We can therefore take the given equation (𝐴+𝐡)=ο€βˆ’13211243417βˆ’36 and transpose both sides, giving ο€Ί(𝐴+𝐡)=ο€βˆ’13211243417βˆ’36.

Since 𝐢=𝐢, the left-hand side of the equation is simplified: 𝐴+𝐡=ο€βˆ’13211243417βˆ’36.

Taking the transpose of the matrix on the right-hand side gives 𝐴+𝐡=ο€βˆ’13417213βˆ’31246.

We can now subtract 𝐴 from both sides, giving 𝐡=ο€βˆ’13417213βˆ’31246οŒβˆ’π΄=ο€βˆ’13417213βˆ’31246οŒβˆ’ο€βˆ’59710βˆ’20637=ο€βˆ’8βˆ’510115βˆ’361βˆ’1.

We can check that this matrix does indeed solve the original equation.

Matrix multiplication between two matrices 𝐴 and 𝐡 is well defined providing that the orders of the two matrices are compatible. By this we mean that we can define the matrix product 𝐴𝐡 as long as 𝐴 has the same number of columns as 𝐡 has rows. In other words, if 𝐴 is of order π‘šΓ—π‘› and 𝐡 is of order 𝑛×𝑝, then the matrix product 𝐴𝐡 is well defined because 𝐴 has 𝑛 columns and 𝐡 has 𝑛 rows. The resulting matrix 𝐴𝐡 is of order π‘šΓ—π‘.

Generally, the matrix product 𝐴𝐡 has a different value to the matrix product 𝐡𝐴, meaning that generally 𝐴𝐡≠𝐡𝐴 and showing that matrix multiplication is generally β€œnot commutative.” This is in contrast to conventional algebra, where two numbers π‘Ž and 𝑏 are known to be β€œcommutative” over multiplication, meaning that π‘Žπ‘=π‘π‘Ž. Furthermore, if the orders of 𝐴 and 𝐡 allow the matrix product to 𝐴𝐡 to exist, this does not mean that the product 𝐡𝐴 exists. In fact, 𝐴𝐡 and 𝐡𝐴 are only both well defined if 𝐴 is of order π‘šΓ—π‘› and 𝐡 is of order π‘›Γ—π‘š.

Although matrix multiplication has a more elaborate definition for matrices with large order, for 2Γ—2 matrices this product is easy to define. Consider the two matrices 𝐴=ο€Ό8725,𝐡=ο€Όβˆ’1532.

The easiest way to avoid making errors when calculating the matrix product is to work entry by entry. Since 𝐴 has order 2Γ—2 and 𝐡 has order 2Γ—2, the matrix 𝐴𝐡 has order 2Γ—2. Therefore, we are looking to find a matrix of the form 𝐴𝐡=ο€»βˆ—βˆ—βˆ—βˆ—ο‡, where the βˆ— represents unknown entries to be calculated. To calculate the entry in the first row and first column of 𝐴𝐡, we combine the first row of 𝐴 with the first column of 𝐡 as shown: 𝐴𝐡=ο€»βˆ—βˆ—βˆ—βˆ—ο‡=ο€Ό8725οˆο€Όβˆ’1532.

The entry is then calculated by combining the elements together in order. The highlighted green entry has the value 8Γ—(βˆ’1)+7Γ—3=13, giving 𝐴𝐡=ο€»13βˆ—βˆ—βˆ—ο‡=ο€Ό8725οˆο€Όβˆ’1532.

The entry in the first row and second column of 𝐴𝐡 is calculated using the first row of 𝐴 and the second column of 𝐡 as shown: 𝐴𝐡=ο€»1354βˆ—βˆ—ο‡=ο€Ό8725οˆο€Όβˆ’1532, where we have performed the calculation 8Γ—5+7Γ—2=54.

To calculate the entry in the second row and first column of 𝐴𝐡, we take the second row of 𝐴 and the first column of 𝐡𝐴𝐡=ο€Ό135413βˆ—οˆ=ο€Ό8725οˆο€Όβˆ’1532, where we have calculated that 2Γ—(βˆ’1)+5Γ—3=13. Finally, we use the second row of 𝐴 and the second column of 𝐡 to calculate that 𝐴𝐡=ο€Ό13541320=ο€Ό8725οˆο€Όβˆ’1532, after calculating that 2Γ—5+5Γ—2=20.

Note that calculating 𝐡𝐴 in this instance will give a different result to 𝐴𝐡, namely, that 𝐡𝐴=ο€Ό2182831.

In this explainer alone, we have described the matrix operations of addition/subtraction, transposition, and multiplication (for 2Γ—2 matrices, at least). Although there are plenty more operations involving matrices, we will now practice one question where all of the ideas covered in this explainer are combined together.

Example 5: Solving Matrix Equations

Given that 𝐴=ο€Όβˆ’6βˆ’512,(𝐴+𝐡)=ο€Όβˆ’4βˆ’4βˆ’116, determine ο€Ήπ΄π΅ο…οŒ³οŒ³.


We first need to calculate 𝐡 from the rightmost equation. First recall that 𝐢=𝐢 for any matrix 𝐢; then, we can take the matrix transpose of (𝐴+𝐡)=ο€Όβˆ’4βˆ’4βˆ’116 to get ο€Ί(𝐴+𝐡)=ο€Όβˆ’4βˆ’4βˆ’116.

Simplifying the left-hand side and taking the transpose of the right-hand side gives 𝐴+𝐡=ο€Όβˆ’4βˆ’11βˆ’46.

Taking the matrix 𝐴 from the left-hand side of the equation to the right-hand side gives 𝐡=ο€Όβˆ’4βˆ’11βˆ’46οˆβˆ’π΄=ο€Όβˆ’4βˆ’11βˆ’46οˆβˆ’ο€Όβˆ’6βˆ’512=ο€Ό2βˆ’6βˆ’54.

We were initially asked to calculate the matrix ο€Ήπ΄π΅ο…οŒ³οŒ³. To do this, we first transpose 𝐴 to find 𝐴=ο€Όβˆ’6βˆ’512,𝐴=ο€Όβˆ’61βˆ’52.

After that we compute the matrix product 𝐴𝐡=ο€Όβˆ’61βˆ’52οˆο€Ό2βˆ’6βˆ’54=ο€Όβˆ’1740βˆ’2038.

Then, we take the transpose to obtain 𝐴𝐡=ο€Όβˆ’17βˆ’204038.

With more knowledge of linear algebra, the calculations above could have been slightly simplified by utilizing the matrix property that (𝐴𝐡)=𝐡𝐴. When working only with addition/subtraction, transposition, and multiplication, there are a range of other algebraic properties that emerge, giving rise to an algebraic system with structures that would never occur in conventional algebra. This set of rules is only enriched by the inclusion of other matrix operations such as scaling, inversion, and exponentiation, with related concepts such as the determinant and the trace also contributing to this.

Key Points

The key points from this explainer are as follows:

  • Matrix addition or subtraction is only well defined between two matrices if they have the same order.
  • Matrix addition or subtraction is completed entry by entry.
  • For a matrix 𝐴 of order π‘šΓ—π‘›, the matrix transpose returns a matrix of order π‘›Γ—π‘š.
  • The matrix transpose switches the rows with the columns. Equivalently, the matrix transpose β€œflips” around the diagonal entries.
  • The matrix product 𝐴𝐡 is only defined if 𝐴 has order π‘šΓ—π‘› and 𝐡 has order 𝑛×𝑝.
  • Matrix multiplication is not commutative, meaning that generally 𝐴𝐡≠𝐡𝐴.

Nagwa uses cookies to ensure you get the best experience on our website. Learn more about our Privacy Policy.