# 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-addition
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/material/lesson/mathematics/matrix/matrix-addition/en.mdx

Learn matrix addition with same-order matrices. Understand properties like commutativity and associativity, then solve practical problems with worked examples.

---

## What Is Matrix Addition?

Matrix addition is a fundamental operation in matrix algebra where two or more matrices are combined to produce a new matrix. This operation can only be performed if the matrices being added have the same size or order.

The result of the addition is a new matrix of the same order, where each element is the sum of the corresponding elements (elements in the same position) from the original matrices.

## Formal Definition of Matrix Addition

Two matrices, let's say matrix $$A$$ and matrix $$B$$, can be added if and only if both matrices have the same order.

Visible text: Two matrices, let's say matrix and matrix , can be added if and only if both matrices have the same order.

Suppose matrix $$A$$ is of order $$m \times n$$ with elements $$a_{ij}$$ (element in the $$i$$-th row and $$j$$-th column), and matrix $$B$$ is also of order $$m \times n$$ with elements $$b_{ij}$$.

Visible text: Suppose matrix is of order with elements (element in the -th row and -th column), and matrix is also of order with elements .

Then, the sum of matrix $$A$$ and matrix $$B$$, which we call matrix $$C$$, is written as $$C = A + B$$. Matrix $$C$$ will also be of order $$m \times n$$, with elements $$c_{ij}$$ defined as:

Visible text: Then, the sum of matrix and matrix , which we call matrix , is written as . Matrix will also be of order , with elements defined as:

```math
c_{ij} = a_{ij} + b_{ij}
```

This means that each element in the resulting matrix is obtained by adding the elements that are in the same position from the two matrices being added.

## How to Perform Matrix Addition

To add two matrices, follow these steps:

1.  **Ensure Same Order**: Check if both matrices have the same number of rows and columns. If not, addition cannot be performed.
2.  **Add Corresponding Elements**: Add the elements that are in the same row and column position from both matrices.
3.  **Form the Resultant Matrix**: Arrange the sums of these elements into a new matrix of the same order.

Visible text: 1. **Ensure Same Order**: Check if both matrices have the same number of rows and columns. If not, addition cannot be performed.
2. **Add Corresponding Elements**: Add the elements that are in the same row and column position from both matrices.
3. **Form the Resultant Matrix**: Arrange the sums of these elements into a new matrix of the same order.

### Example of Matrix Addition

Suppose we have two matrices, $$P$$ and $$Q$$, as follows:

Visible text: Suppose we have two matrices, and , as follows:

Component: MathContainer
Children:

```math
P = \begin{bmatrix} 1 & 5 \\ -2 & 0 \\ 4 & 7 \end{bmatrix}
```

```math
Q = \begin{bmatrix} 6 & -3 \\ 8 & 1 \\ -2 & 9 \end{bmatrix}
```

Both matrices are of order $$3 \times 2$$ ($$3$$ rows and $$2$$ columns), so they can be added.

Visible text: Both matrices are of order ( rows and columns), so they can be added.

Then, $$P+Q$$ is:

Visible text: Then, is:

Component: MathContainer
Children:

```math
P+Q = \begin{bmatrix} 1 & 5 \\ -2 & 0 \\ 4 & 7 \end{bmatrix} + \begin{bmatrix} 6 & -3 \\ 8 & 1 \\ -2 & 9 \end{bmatrix}
```

```math
= \begin{bmatrix} 1+6 & 5+(-3) \\ -2+8 & 0+1 \\ 4+(-2) & 7+9 \end{bmatrix}
```

```math
= \begin{bmatrix} 7 & 2 \\ 6 & 1 \\ 2 & 16 \end{bmatrix}
```

Thus, the sum of matrix $$P$$ and matrix $$Q$$ is the matrix $$\begin{bmatrix} 7 & 2 \\ 6 & 1 \\ 2 & 16 \end{bmatrix}$$.

Visible text: Thus, the sum of matrix and matrix is the matrix .

### Matrices That Cannot Be Added

Suppose matrix $$X = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix}$$ and matrix $$Y = \begin{bmatrix} 5 & 6 & 7 \\ 8 & 9 & 10 \end{bmatrix}$$.

Visible text: Suppose matrix and matrix .

Matrix $$X$$ is of order $$2 \times 2$$, while matrix $$Y$$ is of order $$2 \times 3$$. Since their orders are different, matrix $$X$$ and matrix $$Y$$ cannot be added.

Visible text: Matrix is of order , while matrix is of order . Since their orders are different, matrix and matrix cannot be added.

## Properties of Matrix Addition

Matrix addition has several important properties, similar to the properties of addition for real numbers. Let $$A$$, $$B$$, and $$C$$ be matrices of the same order, and $$O$$ be the zero matrix (a matrix where all elements are zero) of the same order as $$A$$, $$B$$, and $$C$$.

Visible text: Matrix addition has several important properties, similar to the properties of addition for real numbers. Let , , and be matrices of the same order, and be the zero matrix (a matrix where all elements are zero) of the same order as , , and .

1.  **Commutative Property**: The order of matrix addition does not affect the result.

    
    
    ```math
    A + B = B + A
    ```

    This means that adding matrix $$A$$ to $$B$$ will produce the same matrix as adding matrix $$B$$ to $$A$$.

2.  **Associative Property**: The grouping in the addition of three or more matrices does not affect the result.

    
    
    ```math
    (A + B) + C = A + (B + C)
    ```

    This means you can add $$A$$ and $$B$$ first,
    then add the result to $$C$$, or
    add $$B$$ and $$C$$ first,
    then add $$A$$ to the result. The final
    outcome will be the same.

3.  **Existence of an Identity Element (Zero Matrix)**: There exists a zero matrix $$O$$ that acts as the identity element in addition.

    
    
    ```math
    A + O = O + A = A
    ```

    This means that if a matrix is added to a zero matrix (of the same order), the result
    is the matrix itself.

    This zero matrix plays a role similar to the number $$0$$ in the addition of numbers.

4.  **Existence of an Additive Inverse (Opposite of a Matrix)**: Every matrix $$A$$ has an additive inverse, denoted as $$-A$$, which when added to $$A$$ results in the zero matrix $$O$$.

    
    
    ```math
    A + (-A) = O
    ```

    The matrix $$-A$$ is a matrix where each element is the
    opposite (negative) of the corresponding elements of matrix $$A$$.

    For example, if $$a_{ij}$$ is an element of $$A$$, then $$-a_{ij}$$ is an element of $$-A$$.

Visible text: 1. **Commutative Property**: The order of matrix addition does not affect the result.

 
 

 This means that adding matrix to will produce the same matrix as adding matrix to .

2. **Associative Property**: The grouping in the addition of three or more matrices does not affect the result.

 
 

 This means you can add and first,
 then add the result to , or
 add and first,
 then add to the result. The final
 outcome will be the same.

3. **Existence of an Identity Element (Zero Matrix)**: There exists a zero matrix that acts as the identity element in addition.

 
 

 This means that if a matrix is added to a zero matrix (of the same order), the result
 is the matrix itself.

 This zero matrix plays a role similar to the number in the addition of numbers.

4. **Existence of an Additive Inverse (Opposite of a Matrix)**: Every matrix has an additive inverse, denoted as , which when added to results in the zero matrix .

 
 

 The matrix is a matrix where each element is the
 opposite (negative) of the corresponding elements of matrix .

 For example, if is an element of , then is an element of .

## Exercises

**Problem** $$1$$

Visible text: **Problem**

Given the following matrices:

Component: MathContainer
Children:

```math
A = \begin{bmatrix} 3 & -1 & 7 \\ 0 & 5 & 2 \end{bmatrix}
```

```math
B = \begin{bmatrix} -2 & 9 & -4 \\ 6 & -3 & 1 \end{bmatrix}
```

```math
C = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
```

Calculate $$A+B$$ and $$B+A$$. Then, determine if $$A+C$$ can be calculated and provide your explanation.

Visible text: Calculate and . Then, determine if can be calculated and provide your explanation.

**Problem** $$2$$

Visible text: **Problem**

Determine the values of $$x, y,$$ and $$z$$ from the following matrix addition:

Visible text: Determine the values of and from the following matrix addition:

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

**Problem** $$3$$

Visible text: **Problem**

If $$P = \begin{bmatrix} 1 & -2 \\ 3 & 0 \end{bmatrix}$$, determine the matrix $$-P$$ (the additive inverse of $$P$$) and prove that $$P + (-P) = O$$, where $$O$$ is the zero matrix of the same order.

Visible text: If , determine the matrix (the additive inverse of ) and prove that , where is the zero matrix of the same order.

### Answer Key

**Problem** $$1$$

Visible text: **Problem**

Given matrices:

Component: MathContainer
Children:

```math
A = \begin{bmatrix} 3 & -1 & 7 \\ 0 & 5 & 2 \end{bmatrix}
```

```math
B = \begin{bmatrix} -2 & 9 & -4 \\ 6 & -3 & 1 \end{bmatrix}
```

```math
C = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}
```

Addition of matrix $$A$$ and $$B$$ ($$A+B$$):

Visible text: Addition of matrix and ():

Component: MathContainer
Children:

```math
A+B = \begin{bmatrix} 3 & -1 & 7 \\ 0 & 5 & 2 \end{bmatrix} + \begin{bmatrix} -2 & 9 & -4 \\ 6 & -3 & 1 \end{bmatrix}
```

```math
= \begin{bmatrix} 3+(-2) & -1+9 & 7+(-4) \\ 0+6 & 5+(-3) & 2+1 \end{bmatrix}
```

```math
= \begin{bmatrix} 1 & 8 & 3 \\ 6 & 2 & 3 \end{bmatrix}
```

Addition of matrix $$B$$ and $$A$$ ($$B+A$$):

Visible text: Addition of matrix and ():

Component: MathContainer
Children:

```math
B+A = \begin{bmatrix} -2 & 9 & -4 \\ 6 & -3 & 1 \end{bmatrix} + \begin{bmatrix} 3 & -1 & 7 \\ 0 & 5 & 2 \end{bmatrix}
```

```math
= \begin{bmatrix} -2+3 & 9+(-1) & -4+7 \\ 6+0 & -3+5 & 1+2 \end{bmatrix}
```

```math
= \begin{bmatrix} 1 & 8 & 3 \\ 6 & 2 & 3 \end{bmatrix}
```

(Commutative property proven: $$A+B = B+A$$)

Visible text: (Commutative property proven: )

Addition of matrix $$A$$ and $$C$$ ($$A+C$$):

Visible text: Addition of matrix and ():

Cannot be calculated. Matrix $$A$$ is of order $$2 \times 3$$, while matrix $$C$$ is of order $$2 \times 2$$. Since their orders are different, the addition $$A+C$$ cannot be performed.

Visible text: Cannot be calculated. Matrix is of order , while matrix is of order . Since their orders are different, the addition cannot be performed.

**Problem** $$2$$

Visible text: **Problem**

Given the matrix addition:

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

Perform matrix addition on the left side:

Component: MathContainer
Children:

```math
\begin{bmatrix} 2x+4 & 5+(-2) \\ -1+z & 3y+7 \end{bmatrix} = \begin{bmatrix} 10 & 3 \\ 6 & 1 \end{bmatrix}
```

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

Based on the equality of two matrices, corresponding elements must be equal:

For the element in row $$1$$, column $$1$$: $$2x+4 = 10$$

Visible text: For the element in row , column :

Component: MathContainer
Children:

```math
2x = 10-4
```

```math
2x = 6
```

```math
x = 3
```

For the element in row $$1$$, column $$2$$: $$3 = 3$$ (already consistent).

Visible text: For the element in row , column : (already consistent).

For the element in row $$2$$, column $$1$$: $$-1+z = 6$$

Visible text: For the element in row , column :

Component: MathContainer
Children:

```math
z = 6+1
```

```math
z = 7
```

For the element in row $$2$$, column $$2$$: $$3y+7 = 1$$

Visible text: For the element in row , column :

Component: MathContainer
Children:

```math
3y = 1-7
```

```math
3y = -6
```

```math
y = -2
```

Thus, the values are $$x=3$$, $$y=-2$$, and $$z=7$$.

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

**Problem** $$3$$

Visible text: **Problem**

Given matrix $$P = \begin{bmatrix} 1 & -2 \\ 3 & 0 \end{bmatrix}$$.

Visible text: Given matrix .

The additive inverse of $$P$$, which is $$-P$$, is:

Visible text: The additive inverse of , which is , is:

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

Proof that $$P + (-P) = O$$:

Visible text: Proof that :

Component: MathContainer
Children:

```math
P + (-P) = \begin{bmatrix} 1 & -2 \\ 3 & 0 \end{bmatrix} + \begin{bmatrix} -1 & 2 \\ -3 & 0 \end{bmatrix}
```

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

```math
= \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix}
```

The result is the zero matrix $$O$$ of order $$2 \times 2$$. Proven.

Visible text: The result is the zero matrix of order . Proven.