# Operations

Let $A=\left[\begin{array}{cc} 1&-2\\ 1&3\end{array}\right]\quad\text{and}\quad B=\left[\begin{array}{cc} 2&4\\ -1&1\end{array}\right].$ $$A+B$$ contains four numbers; what is their product?

## Operations

### Matrices

# Operations

Matrix addition is almost completely analogous to addition of real numbers, but matrix multiplication is not. Matrix multiplication does not retain all the properties of scalar multiplication, and is not even always defined.

## Operations

### Matrices

# Operations

Let $A=\left[\begin{array}{cc} 1&-2\\ 1&3\end{array}\right]\quad\text{and}\quad B=\left[\begin{array}{cc} 2&4\\ -1&1\end{array}\right].$ $$AB-BA$$ contains four numbers; what is their product?

## Operations

### Matrices

# Operations

Suppose that $$A$$ is an $$a\times b$$ matrix, $$B$$ is a $$c\times d$$ matrix, and $$C$$ is an $$e\times f$$ matrix. If the product $$AB$$ is a $$2\times 4$$ matrix, and the product $$BC$$ is $$1\times 3$$ matrix, what is $$a+b+c+d+e+f$$?

## Operations

### Matrices

# Operations

An operation unique to matrices is the determinant. The determinant is especially important because matrices with zero determinant have very different properties from matrices with non-zero determinant, and many standard algorithms for working with matrices break down when the determinant is zero.

## Operations

### Matrices

# Operations

Let $A=\left[\begin{array}{cc} 1&-2\\ 1&3\end{array}\right]\quad\text{and}\quad B=\left[\begin{array}{cc} 2&4\\ -1&1\end{array}\right].$ What is the determinant of $$AB$$?

## Operations

### Matrices

# Operations

Another matrix operation is the transpose - this operation reflects the entries of a matrix across its main diagonal. This amounts to switching the row and column for each entry.

This can be useful for detecting symmetry in data. If we have some data in a matrix, and we take the transpose and compare it to the original matrix, this tells us about how close our original data was to being symmetric.

## Operations

### Matrices

# Operations

Let $A=\left[\begin{array}{cc} 1&-2\\ 1&3\end{array}\right].$ What is the transpose of $$A$$?

## Operations

### Matrices

# Operations

Let $A=\left[\begin{array}{cc} 1&-2\\ 1&3\end{array}\right].$ What is the trace of $$A$$?

## Operations

### Matrices

# Operations

These matrix operations don't always go together in the way you'd expect - many matrix calculations require successively applying these operations and simplifying the result. For example, linear regression can require looking at matrices of the form $$(AA^T)^{-1}$$, so understanding how they interact is essential.

## Operations

### Matrices

# Operations

For square matrices $$A$$ and $$B$$, which of the matrices below are equal to $$AB$$? $\text{I. } \left(B^TA^T\right)^T\qquad\text{II. } \left(A^TB^T\right)^T$

## Operations

### Matrices

# Operations

Which of the quantities below are equal to $$\text{trace}(AB)$$? $\text{I. } \text{trace}(A)\text{trace}(B)\qquad\text{II. } \text{trace}(BA)$

## Operations

### Matrices

×