# Definition and Terminology

## Definition

A matrix is an array of mathematical objects. It could contain real numbers, complex numbers, functions even other matrices. For our purposes we will focus on real numbers. We usually name a matrix with a upper case letter and name its entries with the corresponding lower case letter.

(1)The entry $a_{ij}$ refers to the entry in matrix $A$ in the *i*th row and *j*th column. For brevity we do not put a comma between the *i* and *j* values unless the number of columns or rows exceeds 9.

## Dimension

The dimension of a matrix refers to the number of columns a matrix has. A matrix with *m* rows and *n* columns is said to have dimension $m \times n$. The notation $A_{m \times n}$ is used to idicate a matrix named $A$ that has dimension $m \times n$.

A matrix that has the same number of rows as columns or in other words has dimension $n \times n$ is called a **square matrix**. The name refers to the fact that the matrix is square in shape.

# Operations

## Addition/Subtraction

In order to add or subtract two matrices with the same dimension we add or subtract the corresponding entries. That is to say,

(2)It is important that both matrices have the same dimension so that there is a corresponding entry to add or subtract. Otherwise the operation is said to be undefined.

## Scalar Multiplication

In order to multiply a matrix by a scalar we multiply every entry in the matrix by the scalar. That is to say,

(3)## Matrix Multiplication

In order to multiply two matrices we take the dot product of each row in the first matrix with each column in the second matrix. IN other words,

(4)**Example**

Note that in order for each row in matrix $A$ to be the same length as each column in matrix $B$, we must have their inner dimensions match. In other words $A_{p \times q}$ and $B_{q \times r}$. If that inner dimension $q$ does not match the operation is undefined.

## Transpose

The transpose $(A^T)$ of a matrix $A$ is one in which each row in the original matrix becomes a column in the resulting matrix.

**Example**

## Determinant

The determinant of a matrix is related to the content of the space spanned by the vectors that make up the matrix. It has many other uses as we have already seen in the calculation of the cross product. The definition of the determinant is recursive. The 3D determinant is based on the 2D determinant, the 4D determinant is based on the 3D determinant and so on. For our purposed we will just focus on 1D, 2D and 3D determinants.

### 1D

(7)### 2D

(8)### 3D

(9)Note that the determinant is only defined for square matrices.

**Example**

# Exercises

1) Given the matrices

(11)a) Find $2A-3B$

b) Find $AB$

c) Find $BA$

d) Find $A^T$

2) Find $|A|$ for the matrix

(12)3) Given two n-dimensional vectors $\vec{u}$ and $\vec{v}$, say we represent them as two $n \times 1$ matrices $U$ and $V$. How would we calculate the dot product of $\vec{u}$ and $\vec{v}$, using matrix operations on $U$ and $V$.