# Nakafa Learning Content

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/en/subjects/mathematics/matrix/matrix-equality
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/matrix/matrix-equality/en.mdx

Learn matrix equality conditions: same order and matching corresponding elements through examples, variable problems, and practice exercises.

---

## Definition of Matrix Equality

In the world of matrices, we often need to compare two or more matrices. One important concept in this comparison is matrix equality. Two matrices are said to be equal if they meet certain conditions.

Two matrices, let's say matrix $$A$$ and matrix $$B$$, are said to be **equal** (written as $$A=B$$) if and only if both of the following conditions are met:

Visible text: Two matrices, let's say matrix and matrix , are said to be **equal** (written as ) if and only if both of the following conditions are met:

1.  **Same Order**: Matrix $$A$$ and matrix $$B$$ must have the same order (number of rows and columns). If matrix $$A$$ has an order of $$m \times n$$, then matrix $$B$$ must also have an order of $$m \times n$$.
2.  **Corresponding Elements are Equal**: Every corresponding element (located in the same row and column position) in matrix $$A$$ and matrix $$B$$ must have the same value. If $$A = [a_{ij}]$$ and $$B = [b_{ij}]$$, then $$a_{ij} = b_{ij}$$ for all values of $$i$$ (row index) and $$j$$ (column index).

Visible text: 1. **Same Order**: Matrix and matrix must have the same order (number of rows and columns). If matrix has an order of , then matrix must also have an order of .
2. **Corresponding Elements are Equal**: Every corresponding element (located in the same row and column position) in matrix and matrix must have the same value. If and , then for all values of (row index) and (column index).

If one of these two conditions is not met, then matrix $$A$$ is not equal to matrix $$B$$ (written as $$A \neq B$$).

Visible text: If one of these two conditions is not met, then matrix is not equal to matrix (written as ).

## Examples of Matrix Equality

### Equal Matrices

Given two matrices:

```math
P = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \quad \text{and} \quad Q = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}
```

Matrix $$P$$ and matrix $$Q$$ are equal ($$P=Q$$) because:

Visible text: Matrix and matrix are equal () because:

- Both have an order of $$2 \times 2$$.
- Corresponding elements have the same value:

  $$p_{11} = q_{11} = 1$$, $$p_{12} = q_{12} = 2$$
  , $$p_{21} = q_{21} = 3$$, $$p_{22} = q_{22} = 4$$
  .

Visible text: - Both have an order of .
- Corresponding elements have the same value:

 , 
 , , 
 .

### Unequal Matrices (Different Order)

Given two matrices:

```math
R = \begin{bmatrix} 4 & -9 \\ 7 & 1 \end{bmatrix} \quad \text{and} \quad C = \begin{bmatrix} 4 & -9 \\ 7 & 1 \\ 0 & 0 \end{bmatrix}
```

Matrix $$R$$ is not equal to matrix $$C$$ ($$R \neq C$$) because the order of matrix $$R$$ is $$2 \times 2$$, while the order of matrix $$C$$ is $$3 \times 2$$.

Visible text: Matrix is not equal to matrix () because the order of matrix is , while the order of matrix is .

### Unequal Matrices (Different Corresponding Elements)

Given two matrices:

```math
S = \begin{bmatrix} 5 & 0 \\ -2 & 8 \end{bmatrix} \quad \text{and} \quad T = \begin{bmatrix} 5 & 0 \\ 2 & 8 \end{bmatrix}
```

Although matrix $$S$$ and matrix $$T$$ have the same order ($$2 \times 2$$), they are not equal ($$S \neq T$$) because the element in the $$2$$nd row and $$1$$st column is not the same ($$s_{21} = -2$$ while $$t_{21} = 2$$).

Visible text: Although matrix and matrix have the same order (), they are not equal () because the element in the nd row and st column is not the same ( while ).

### Determining Variable Values from Matrix Equality

Given matrices $$A = \begin{bmatrix} -x & 2 \\ -3y & z^2 \end{bmatrix}$$ and $$B = \begin{bmatrix} -1 & 2 \\ 6 & 9 \end{bmatrix}$$.

Visible text: Given matrices and .

If matrix $$A$$ is equal to matrix $$B$$ ($$A=B$$), determine the values of $$x$$, $$y$$, and $$z$$.

Visible text: If matrix is equal to matrix (), determine the values of , , and .

**Solution:**

Since $$A=B$$, the corresponding elements must be equal:

Visible text: Since , the corresponding elements must be equal:

1.  $$a_{11} = b_{11} \implies -x = -1 \implies x = 1$$
2.  $$a_{12} = b_{12} \implies 2 = 2$$ (already equal)
3.  $$a_{21} = b_{21} \implies -3y = 6 \implies y = \frac{6}{-3} \implies y = -2$$
4.  $$a_{22} = b_{22} \implies z^2 = 9 \implies z = \pm\sqrt{9} \implies z = 3 \text{ or} z = -3$$

Visible text: 1. 
2. (already equal)
3. 
4.

Thus, the values are $$x=1$$, $$y=-2$$, and $$z = \pm 3$$.

Visible text: Thus, the values are , , and .

## Exercises

Answer the following questions with **True** or **False**.

1.  Two matrices having the same order is one of the conditions for the two matrices to be equal.
2.  Two different matrices always have different orders.
3.  If given matrix $$K = \begin{bmatrix} 2 & 0 \\ 0 & 2 \end{bmatrix}$$ and matrix $$L = \begin{bmatrix} 2 & 0 \\ 0 & 2 \\ 0 & 0 \end{bmatrix}$$, then matrix $$K$$ is equal to matrix $$L$$.
4.  Given matrices $$P = \begin{bmatrix} 2x & 4 \\ -1 & y+3 \end{bmatrix}$$ and $$Q = \begin{bmatrix} -10 & 4 \\ -1 & 2 \end{bmatrix}$$. If $$P=Q$$, determine the values of $$x$$ and $$y$$.
5.  If matrix $$A = \begin{bmatrix} -x-3y & 0 \\ (x-2y)^2 & 1 \end{bmatrix}$$ and $$I$$ is the identity matrix of order $$2 \times 2$$. If $$A = I$$, determine the value of $$x+y$$.
6.  Calculate the value of $$a+b+c+d$$ that satisfies the following matrix equality:

    
    
    ```math
    \begin{bmatrix} a+2b & 2a+b \\ c+d & 2c+d \end{bmatrix} = \begin{bmatrix} 3 & -3 \\ 7 & 1 \end{bmatrix}
    ```

Visible text: 1. Two matrices having the same order is one of the conditions for the two matrices to be equal.
2. Two different matrices always have different orders.
3. If given matrix and matrix , then matrix is equal to matrix .
4. Given matrices and . If , determine the values of and .
5. If matrix and is the identity matrix of order . If , determine the value of .
6. Calculate the value of that satisfies the following matrix equality:

### Answer Key

1.  **True**. Having the same order is the first condition for two matrices to be equal.
2.  **False**. Two different matrices can have the same order, but their corresponding elements are different (see Example $$3$$).
3.  **False**. Matrix $$K$$ has an order of $$2 \times 2$$ while matrix $$L$$ has an order of $$3 \times 2$$. Since their orders are different, the two matrices are not equal.
4.  Given $$P=Q$$:

    
    
    ```math
    \begin{bmatrix} 2x & 4 \\ -1 & y+3 \end{bmatrix} = \begin{bmatrix} -10 & 4 \\ -1 & 2 \end{bmatrix}
    ```

    From the equality of corresponding elements:

    - $$2x = -10 \implies x = -5$$
    - $$y+3 = 2 \implies y = 2-3 \implies y = -1$$

      Thus, $$x=-5$$ and $$y=-1$$.

5.  The identity matrix $$I$$ of order $$2 \times 2$$ is $$I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$$.

    Given $$A=I$$:

    
    
    ```math
    \begin{bmatrix} -x-3y & 0 \\ (x-2y)^2 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
    ```

    From the equality of corresponding elements, we obtain a system of equations:

    1.  $$-x-3y = 1$$ (Equation $$1$$)
    2.  $$(x-2y)^2 = 0$$ (Equation $$2$$)

    Solve Equation $$2$$ first:

    <MathContainer>
      
        
        ```math
        (x-2y)^2 = 0
        ```

      
        
        ```math
        x-2y = \sqrt{0}
        ```

      
        
        ```math
        x-2y = 0
        ```

      <BlockMath math="x = 2y \quad \text{(Equation 2')}" />
    </MathContainer>

    Substitute Equation $$2$$' into Equation $$1$$:

    <MathContainer>
      
        
        ```math
        -(2y)-3y = 1
        ```

      
        
        ```math
        -2y-3y = 1
        ```

      
        
        ```math
        -5y = 1
        ```

      
        
        ```math
        y = -\frac{1}{5}
        ```

    </MathContainer>

    Substitute the value of $$y = -\frac{1}{5}$$ into Equation <InlineMath math="2'" />:

    <MathContainer>
      
        
        ```math
        x = 2\left(-\frac{1}{5}\right)
        ```

      
        
        ```math
        x = -\frac{2}{5}
        ```

    </MathContainer>

    Then, the value of $$x+y$$ is:

    <MathContainer>
      
        
        ```math
        x+y = \left(-\frac{2}{5}\right) + \left(-\frac{1}{5}\right)
        ```

      
        
        ```math
        = -\frac{2}{5} - \frac{1}{5}
        ```

      
        
        ```math
        = \frac{-2-1}{5}
        ```

      
        
        ```math
        = -\frac{3}{5}
        ```

    </MathContainer>

6.  Given the matrix equality:

    
    
    ```math
    \begin{bmatrix} a+2b & 2a+b \\ c+d & 2c+d \end{bmatrix} = \begin{bmatrix} 3 & -3 \\ 7 & 1 \end{bmatrix}
    ```

    From the equality of corresponding elements, we obtain a system of equations:

    1.  $$a+2b = 3$$
    2.  $$2a+b = -3$$
    3.  $$c+d = 7$$
    4.  $$2c+d = 1$$

    Solve the system of equations for $$a$$ and $$b$$ (equations $$1$$ and $$2$$):

    Initial equations:

    <MathContainer>
      
        
        ```math
        a+2b = 3 \quad \text{(1)}
        ```

      
        
        ```math
        2a+b = -3 \quad \text{(2)}
        ```

    </MathContainer>

    To eliminate $$b$$, multiply equation ($$2$$) by $$2$$:

    <MathContainer>
      
        
        ```math
        2(2a+b) = 2(-3)
        ```

      <BlockMath math="4a+2b = -6 \quad \text{(2')}" />
    </MathContainer>

    Subtract equation ($$1$$) from equation ($$2$$'):

    <MathContainer>
      
        
        ```math
        (4a+2b) - (a+2b) = -6 - 3
        ```

      
        
        ```math
        4a - a + 2b - 2b = -9
        ```

      
        
        ```math
        3a = -9
        ```

      
        
        ```math
        a = \frac{-9}{3}
        ```

      
        
        ```math
        a = -3
        ```

    </MathContainer>

    Substitute the value of $$a=-3$$ into equation ($$1$$):

    <MathContainer>
      
        
        ```math
        -3+2b=3
        ```

      
        
        ```math
        2b=3+3
        ```

      
        
        ```math
        2b=6
        ```

      
        
        ```math
        b = \frac{6}{2}
        ```

      
        
        ```math
        b = 3
        ```

    </MathContainer>

    Solve the system of equations for $$c$$ and $$d$$ (equations $$3$$ and $$4$$):

    Initial equations:

    <MathContainer>
      
        
        ```math
        c+d = 7 \quad \text{(3)}
        ```

      
        
        ```math
        2c+d = 1 \quad \text{(4)}
        ```

    </MathContainer>

    Subtract equation ($$3$$) from equation ($$4$$) to eliminate $$d$$:

    <MathContainer>
      
        
        ```math
        (2c+d) - (c+d) = 1 - 7
        ```

      
        
        ```math
        2c - c + d - d = -6
        ```

      
        
        ```math
        c = -6
        ```

    </MathContainer>

    Substitute the value of $$c=-6$$ into equation ($$3$$):

    <MathContainer>
      
        
        ```math
        -6+d=7
        ```

      
        
        ```math
        d=7+6
        ```

      
        
        ```math
        d=13
        ```

    </MathContainer>

    Then, the value of $$a+b+c+d$$ is:

    <MathContainer>
      
        
        ```math
        a+b+c+d = (-3) + 3 + (-6) + 13
        ```

      
        
        ```math
        = 0 - 6 + 13
        ```

      
        
        ```math
        = 7
        ```

    </MathContainer>

Visible text: 1. **True**. Having the same order is the first condition for two matrices to be equal.
2. **False**. Two different matrices can have the same order, but their corresponding elements are different (see Example ).
3. **False**. Matrix has an order of while matrix has an order of . Since their orders are different, the two matrices are not equal.
4. Given :

 
 

 From the equality of corresponding elements:

 - 
 - 

 Thus, and .

5. The identity matrix of order is .

 Given :

 
 

 From the equality of corresponding elements, we obtain a system of equations:

 1. (Equation )
 2. (Equation )

 Solve Equation first:

 <MathContainer>
 
 

 
 

 
 

 <BlockMath math="x = 2y \quad \text{(Equation 2')}" />
 </MathContainer>

 Substitute Equation ' into Equation :

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

 Substitute the value of into Equation <InlineMath math="2'" />:

 <MathContainer>
 
 

 
 

 </MathContainer>

 Then, the value of is:

 <MathContainer>
 
 

 
 

 
 

 
 

 </MathContainer>

6. Given the matrix equality:

 
 

 From the equality of corresponding elements, we obtain a system of equations:

 1. 
 2. 
 3. 
 4. 

 Solve the system of equations for and (equations and ):

 Initial equations:

 <MathContainer>
 
 

 
 

 </MathContainer>

 To eliminate , multiply equation () by :

 <MathContainer>
 
 

 <BlockMath math="4a+2b = -6 \quad \text{(2')}" />
 </MathContainer>

 Subtract equation () from equation ('):

 <MathContainer>
 
 

 
 

 
 

 
 

 
 

 </MathContainer>

 Substitute the value of into equation ():

 <MathContainer>
 
 

 
 

 
 

 
 

 
 

 </MathContainer>

 Solve the system of equations for and (equations and ):

 Initial equations:

 <MathContainer>
 
 

 
 

 </MathContainer>

 Subtract equation () from equation () to eliminate :

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 Substitute the value of into equation ():

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>

 Then, the value of is:

 <MathContainer>
 
 

 
 

 
 

 </MathContainer>