# Matrices

Matrices are mathematical concept that expresses numbers, letters and symbols in rows and columns

Add the matrices A + B

A = $\left[\begin{array}{cc}a& b\\ c& d\end{array}\right]$ + B = $\left[\begin{array}{cc}e& f\\ g& h\end{array}\right]$

A + B = $\left[\begin{array}{cc}a + e& b + f\\ c + g& d + h\end{array}\right]$

### Example 1

Find the value of the following matrices

(a) A + B

(b) B + C

Solutions:

(a) A + B

A = $\left[\begin{array}{cc}5& 3\\ 1& 6\end{array}\right]$ B = $\left[\begin{array}{cc}2& 9\\ 10& 7\end{array}\right]$

A + B = $\left[\begin{array}{cc}5 + 2& 3 + 9\\ 1 + 10& 6 + 7\end{array}\right]$

Answer: A + B = $\left[\begin{array}{cc}7& 12\\ 11& 13\end{array}\right]$

(b) B + C

B = $\left[\begin{array}{cc}2& 9\\ 10& 7\end{array}\right]$ C = $\left[\begin{array}{cc}4& 0\\ 1& 8\end{array}\right]$

B + C = $\left[\begin{array}{cc}2 + 4& 9 + 0\\ 10 + 1& 7 + 8\end{array}\right]$

Answer: B + C = $\left[\begin{array}{cc}6& 9\\ 11& 15\end{array}\right]$

## Subtraction of matrices

Subtraction A - B

A = $\left[\begin{array}{cc}a& b\\ c& d\end{array}\right]$ - B = $\left[\begin{array}{cc}e& f\\ g& h\end{array}\right]$

A - B = $\left[\begin{array}{cc}a - e& b - f\\ c - g& d - h\end{array}\right]$

### Example 2

Find the value of the following matrices

A - B

A = $\left[\begin{array}{cc}5& 3\\ 1& 6\end{array}\right]$ B = $\left[\begin{array}{cc}2& 9\\ 10& 7\end{array}\right]$

A - B = $\left[\begin{array}{cc}5 - 2& 3 - 9\\ 1 - 10& 6 - 7\end{array}\right]$

Answer: A - B = $\left[\begin{array}{cc}3& -6\\ -9& -1\end{array}\right]$

## Multiplication of matrices

Find the multiplication of A X B

A = $\left[\begin{array}{cc}a& b\\ c& d\end{array}\right]$ B = $\left[\begin{array}{cc}e& f\\ g& h\end{array}\right]$

A X B = $\left[\begin{array}{cc}a × e + b × g& a × f + b × h\\ c × e + d × g& c × f + d × h\end{array}\right]$

### Example 3

Find the matrices A X B

A = $\left[\begin{array}{cc}5& 3\\ 1& 6\end{array}\right]$ B = $\left[\begin{array}{cc}2& 9\\ 10& 7\end{array}\right]$

A X B = $\left[\begin{array}{cc}5 × 2 + 3 × 10& 5 × 9 + 3 × 7\\ 1 × 2 + 6 × 10& 1 × 9 + 6 × 7\end{array}\right]$

A X B = $\left[\begin{array}{cc}10 + 30& 45 + 21\\ 2 + 60& 9 + 42\end{array}\right]$

Answer: A X B = $\left[\begin{array}{cc}40& 66\\ 62& 51\end{array}\right]$

## Transpose and multiplication of matrices

Given that

A = $\left[\begin{array}{cc}2& 3\\ 1& 0\end{array}\right]$, B = $\left[\begin{array}{cc}-1& 0\\ x& 2\end{array}\right]$ and C = $\left[\begin{array}{cc}7& 6\\ -1& 0\end{array}\right]$

Find

(a) ${C}^{T}$

(b) x for which AB = C

Solution:

(a) Power T on C is the Transpose of the matrix, Transpose means interchanging rows and columns

Answer:   ${C}^{T}$ = $\left[\begin{array}{cc}7& -1\\ 6& 0\end{array}\right]$

(b) AB = C

AB = $\left[\begin{array}{cc}2& 3\\ 1& 0\end{array}\right]$ $\left[\begin{array}{cc}-1& 0\\ x& 2\end{array}\right]$

AB = $\left[\begin{array}{cc}2\left(-1\right)+3x& 2\left(0\right)+3\left(2\right)\\ 1\left(-1\right)+ 0\left(x\right)& 1\left(0\right)+0\left(2\right)\end{array}\right]$

AB = $\left[\begin{array}{cc}-2+3x& 0+6\\ -1+ 0& 0+0\end{array}\right]$

AB = $\left[\begin{array}{cc}-2+3x& 6\\ -1& 0\end{array}\right]$

AB = C $\left[\begin{array}{cc}-2+3x& 6\\ -1& 0\end{array}\right]$ = $\left[\begin{array}{cc}7& 6\\ -1& 0\end{array}\right]$

$-2+3x=7$

$3x=7 + 2$

$3x=9$

$\frac{x}{3}=\frac{9}{3}$

## How to Find inverse of a matrix and its determinant

Given that matrix A = $\left[\begin{array}{cc}7& 4p\\ 9& 5p\end{array}\right]$

(a) Find the value of p for which the determinant of A is -2

(b) hence find the inverse of A

Solution:

(a) The Formula for a determinant is D = ad -bc

D = $\left[\begin{array}{cc}a& b\\ c& d\end{array}\right]$

a = 7

b = 4p

c = 9

d = 5p

D = -2

$D=ad-bc$

$\mathrm{-2}=75p-\mathrm{4p}9$

$\mathrm{-2}=35p-36p$

$\mathrm{-2}=-p$

(b) Inverse of A

## Steps on how to find the inverse of a matrix

1. The determinant will be the denominators of 1 and it will be multipled into all the matrices values, in this case $\frac{1}{-2}$ or ${\mathrm{-2}}^{-1}$ is the determinant, hence D = $\frac{1}{-2}$

2. The diagonal variables a and d will be interchanged

3. The diagonal variables b and c are multiplied by -1

A= $\left[\begin{array}{cc}7& 4p\\ 9& 5p\end{array}\right]$

p = 2

A = $\left[\begin{array}{cc}7& 4\left(2\right)\\ 9& 5\left(2\right)\end{array}\right]$

A = $\left[\begin{array}{cc}7& 8\\ 9& 10\end{array}\right]$

determinant is: -2

$\frac{1}{-2}$ = $\left[\begin{array}{cc}7/-2& 8/-2\\ 9/-2& 10/-2\end{array}\right]$

$\frac{1}{-2}$ = $\left[\begin{array}{cc}-7/2& -4\\ -9/2& -5\end{array}\right]$

$\frac{1}{-2}$ = $\left[\begin{array}{cc}-5& -4\\ -9/2& -7/2\end{array}\right]$

$\frac{1}{-2}$ = $\left[\begin{array}{cc}-5& 4\\ 9/2& -7/2\end{array}\right]$

Answer: ${A}^{-1}:\frac{1}{-2}$ = $\left[\begin{array}{cc}-5& 4\\ 9/2& -7/2\end{array}\right]$