Lesson Explainer: Equal Matrices Mathematics

In this explainer, we will learn how to identify the conditions for two matrices to be equal.

Given that linear algebra is different to conventional algebra, it is no surprise that there are fundamentally different concepts involved. Ideas such as the order, type, and transpose simply do not appear in conventional algebra. In conventional algebra, two quantities are equal if they have the same value. For example, if we have π‘₯=5 and 𝑦=5 then we can say that the two quantities are equal and hence write π‘₯=𝑦.

Alternatively, if we have π‘Ž=5 and 𝑏=βˆ’10 then clearly these quantities are not equal and we would write π‘Žβ‰ π‘. However, these quantities are related and one such example is to say that π‘Ž=βˆ’12𝑏 or, equivalently, that 𝑏=βˆ’2π‘Ž. This is not the only relationship between π‘Ž and 𝑏 in this case, since we could also say that π‘Ž=𝑏+15 or something more convoluted such as π‘Ž=120π‘οŠ¨. We could invent infinitely many such relationships, so long as both sides of the equation have the same value.

In order for linear algebra to be well defined, we need to have a definition of equality, which will allow for us to describe relationships between matrices. The notion of equality in conventional algebra is as we have described above, but for linear algebra we need to consider that matrices have multiple entries and therefore our definition of equality has to respect this.

Definition: Equality of Two Matrices

Consider two matrices 𝐴 and 𝐡 which are described by their entries as follows: 𝐴=(π‘Ž),𝐡=𝑏.

The two matrices are considered β€œequal” only if every entry is identical. In other words, we require that π‘Ž=𝑏 for all 𝑖,𝑗. If this is the case, then we write 𝐴=𝐡.

If there are any 𝑖,𝑗 such that π‘Žβ‰ π‘οƒο…οƒο…, we write 𝐴≠𝐡.

In some way, this definition is unsurprising, as there is no obvious alternative way for describing equality between two matrices. On the other hand, this definition of equality is clearly more strict than would be used in conventional algebra, which has no need to discuss multiple entries.

Example 1: Conditions for the Equality of Matrices

Given that 𝐴=ο€Ό333333,𝐡=ο€Ό3333, is it true that 𝐴=𝐡?


The matrices 𝐴 and 𝐡 can be written as 𝐴=(π‘Ž),𝐡=(𝑏).οƒο…ο‡οˆ

Since the matrix 𝐴 has two rows and three columns, we have 𝑖=1,2 and 𝑗=1,2,3. The matrix 𝐡 has two rows and two columns and hence π‘˜=1,2 and 𝑙=1,2.

This demonstrates immediately that the two matrices cannot be equal. The entries π‘ŽοŠ§οŠ© and π‘ŽοŠ¨οŠ© are highlighted below: 𝐴=ο€Ό333333.

However, the matrix 𝐡 has no entries π‘οŠ§οŠ© or π‘οŠ¨οŠ©, given that it only has two columns. Since these entries do not exist, we conclude that 𝐴≠𝐡, meaning that the statement is false.

At this point, it is hopefully clear that there is one immediate condition which, if not met, implies that two matrices cannot be equal. If we are attempting to compare the entries of two matrices with a differing number of rows or columns, then we would find this to be an impossible task, meaning that it is not possible for two such matrices to be equal.

Theorem: Matrix Order and Matrix Equality

For two matrices 𝐴 and 𝐡 to be equal, they must have the same number of rows and the same number of columns. In other words, the matrices must have the same order.

Note that two matrices having the same order is a necessary condition for equality but it is not a sufficient condition. Just because two matrices share the same order, it does not mean that they are automatically equal. This is very straightforward to demonstrate with the two matrices below: 𝐴=000000000010,𝐡=000000000000

These matrices both have 3 rows and 4 columns and are therefore both of order 3Γ—4. These are also both very simple matrices, with every entry being zero except for π‘ŽοŠ©οŠ©, which we have highlighted. However, given that π‘Žβ‰ π‘οŠ©οŠ©οŠ©οŠ©, these matrices are not equal and therefore we write 𝐴≠𝐡.

Example 2: Identifying Equality of Matrices

If 𝐴=ο€Όβˆ’53βˆ’7βˆ’3,𝐡=ο€Όβˆ’5βˆ’3βˆ’73, is it true that 𝐴=𝐡?


These two matrices both have order 2Γ—2, so to check for equality we will have to check every entry. In the matrices below, we have highlighted every entry in a different color to provide an easy comparison: 𝐴=ο€Όβˆ’53βˆ’7βˆ’3,𝐡=ο€Όβˆ’5βˆ’3βˆ’73.

From this we find that π‘Ž=π‘οŠ§οŠ§οŠ§οŠ§ and π‘Ž=π‘οŠ¨οŠ§οŠ¨οŠ§. However, we also find that π‘Žβ‰ π‘οŠ§οŠ¨οŠ§οŠ¨ and that π‘Žβ‰ π‘οŠ¨οŠ¨οŠ¨οŠ¨, which means that these two matrices are not equal.

When working with larger matrices, the same principle applies in exactly the same way, only with a larger number of comparisons to be made. In practice, rather than writing down every single comparison, we would inspect the two matrices to find any difference between pairs of entries. For example, consider the two matrices of order 3Γ—3: 𝐴=ο€βˆ’214320βˆ’152,𝐡=ο€βˆ’214310βˆ’1βˆ’52.

Given that these matrices do have the same order, we then look for pairs of entries which differ: 𝐴=ο€βˆ’214320βˆ’152,𝐡=ο€βˆ’214310βˆ’1βˆ’52.

We have that π‘Žβ‰ π‘οŠ¨οŠ¨οŠ¨οŠ¨ and that π‘Žβ‰ π‘οŠ©οŠ¨οŠ©οŠ¨, which gives two reasons why 𝐴≠𝐡.

Example 3: Solving Equations Using Matrix Equality

Given that ο€½3π‘₯βˆ’3βˆ’3βˆ’10π‘¦βˆ’1=ο€½0βˆ’3βˆ’105π‘¦βˆ’5, find the values of π‘₯ and 𝑦.


We begin by highlighting all of the entries that we must compare: ο€½3π‘₯βˆ’3βˆ’3βˆ’10π‘¦βˆ’1=ο€½0βˆ’3βˆ’105π‘¦βˆ’5.

There are two pairs of entries that are clearly equal in both matrices, namely, that π‘Ž=𝑏=βˆ’3 and that π‘Ž=𝑏=βˆ’10.

To ensure that these matrices are equal, we set π‘Ž=π‘οŠ§οŠ§οŠ§οŠ§, which implies that 3π‘₯βˆ’3=0, giving π‘₯=1. We now set π‘Ž=π‘οŠ¨οŠ¨οŠ¨οŠ¨ which gives π‘¦βˆ’1=5π‘¦βˆ’5 and hence 𝑦=1. The final matrix is ο€Ό0βˆ’3βˆ’100.

The question above shows how the condition on matrix equality is very restrictive. The matrices in the previous question were both of order 2Γ—2 and hence had 4 entries each. Immediately, we could observe that two pairs of entries were identical across both matrices. Even though we had found two instances of equality, we still had to check two remaining pairs of entries. Had either of these pairs of entries been unequal, the matrices would not have been equal, by definition.

The following three examples demonstrate how equality between matrices might rely on the correct calculation of multiple variables.

Example 4: Solving Equations Using Matrix Equality

Find the values of π‘₯ and 𝑦, given the following: ο€½10π‘₯+102βˆ’39=ο€½2022𝑦+99.


We highlight each pair of entries as shown: ο€½10π‘₯+102βˆ’39=ο€½2022𝑦+99.

Clearly we already have π‘Ž=𝑏=2 and π‘Ž=𝑏=9, so there are no further checks needed for these entries.

By setting π‘Ž=π‘οŠ§οŠ§οŠ§οŠ§, we obtain the equation 10π‘₯+10=20, which gives the two solutions π‘₯=Β±1.

By setting π‘Ž=π‘οŠ¨οŠ§οŠ¨οŠ§, we have βˆ’3=2𝑦+9, implying that 𝑦=βˆ’6.

Example 5: Solving Equations Using Matrix Equality

Given that ο€Όπ‘Ž+π‘π‘Žβˆ’π‘π‘Ž+𝑏+π‘π‘Žβˆ’7π‘βˆ’π‘‘οˆ=ο€Όβˆ’3βˆ’17βˆ’5βˆ’64, determine the values of π‘Ž,𝑏,𝑐, and 𝑑.


Given that the two matrices are equal, we can make the comparison for each entry: ο€Όπ‘Ž+π‘π‘Žβˆ’π‘π‘Ž+𝑏+π‘π‘Žβˆ’7π‘βˆ’π‘‘οˆ=ο€Όβˆ’3βˆ’17βˆ’5βˆ’64, which gives the system of linear equations π‘Ž+𝑏=βˆ’3,π‘Žβˆ’π‘=βˆ’17,π‘Ž+𝑏+𝑐=βˆ’5,π‘Žβˆ’7π‘βˆ’π‘‘=βˆ’64.

The first two of these equations are π‘Ž+𝑏=βˆ’3 and π‘Žβˆ’π‘=βˆ’17. These are solved simultaneously to give π‘Ž=βˆ’10 and 𝑏=7.

We then use the given equation π‘Ž+𝑏+𝑐=βˆ’5. Using the calculated values of π‘Ž and 𝑏, we find that 𝑐=βˆ’2.

The final equation π‘Žβˆ’7π‘βˆ’π‘‘=βˆ’64 can be solved using the known values for π‘Ž and 𝑏, giving 𝑑=5.

Example 6: Solving Equations Using Matrix Equality

Given that ο€Ύ99π‘₯+3𝑦2π‘₯βˆ’6𝑦9=ο€Ό32π‘π‘Ž2οˆο—ο˜ find the value of π‘π‘Ž.


By highlighting the paired entries, ο€Ύ99π‘₯+3𝑦2π‘₯βˆ’6𝑦9=ο€Ό32π‘π‘Ž2,ο—ο˜ we deduce that we must solve the system of equations 9=32,9π‘₯+3𝑦=𝑏,2π‘₯βˆ’6𝑦=π‘Ž,9=2.ο—ο˜

We can find the values of π‘₯ and 𝑦 directly from the two equations 9=32 and 9=2. By taking logarithms of both sides, we obtain π‘₯=(32)log and 𝑦=(2)log.

By understanding the laws of exponents and logarithms, we use the condition 9π‘₯+3𝑦=𝑏 to find 𝑏=9π‘₯+3𝑦=9ο€Ί(32)+3ο€Ί(2)=3ο€Ή32+3(2)=3ο€Ή32Γ—2=3ο€»ο€Ή2×2=3ο€Ή2=48(2).loglogloglogloglogloglog

Since 𝑏=48(2)log, we now find π‘Ž using the given equation 2π‘₯βˆ’6𝑦=π‘Ž. We have π‘Ž=2π‘₯βˆ’6𝑦=2ο€Ί(32)ο†βˆ’6ο€Ί(2)=2(32)βˆ’2ο€Ή2=2ο€Ό322=2ο€Ύ22=2ο€Ή2=4(2).loglogloglogloglogloglog

Now that we have π‘Ž=4(2)log, we calculate that π‘π‘Ž=48(2)4(2)=484=12.loglog

Therefore, π‘π‘Ž=12.

In a superficial sense, checking for matrix equality is nothing more than checking for multiple, separate instances of equality across all of the matrix entries. Ultimately, this bland assessment is a totally accurate one, as the definition of matrix equality does indeed require comparing all entries of the two matrices involved. However, the situation changes when we are working with matrices that have entries which are populated to some extent by variables, as well as numbers. This flexibility, when combined with other operations from linear algebra (such as matrix multiplication, matrix exponentiation, and matrix inversion), allows for more elaborate mathematical problems to be constructed, as we have seen above. For example, once matrix multiplication has been well defined, it is possible to encode entire systems of linear equations in terms of simple matrix equations, providing a powerful and concise language for working with such advanced concepts. Although defining matrix equality might seem unnecessary or trivial, it is of crucial importance for understanding linear algebra and the many indispensable mathematical tools that this area has provided.

Key Points

  • For two matrices 𝐴 and 𝐡 to be β€œequal,” it must be the case that π‘Ž=𝑏 for all 𝑖,𝑗. In other words, each entry must be identical.
  • Matrix equality is a strict condition. If π‘Žβ‰ π‘οƒο…οƒο… for any 𝑖,𝑗 then 𝐴≠𝐡.
  • If 𝐴 and 𝐡 are two matrices with different orders, then 𝐴≠𝐡.

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