Linear Algebra Basics

Matrix Multiplication

Basic notations

Vector

Vector is usually referred as a column vector, which is a $k \times 1$ matrix. An example of $3 \times 1$ vector is as follow

$\mathbf{v} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}$

Row vector, on the other hand, is the transpose of a column vector. The transpose of $\mathbf{v}$ is a $1 \times 3$ row vector.

$\mathbf{v}^{T} = \begin{pmatrix} 1 & 2 & 3 \\ \end{pmatrix}$

Matrix

Matrix is denoted by $\textsf{#row} \times \textsf{#column}$. A $4 \times 3$ matrix looks like

$\mathbf{X} = \begin{pmatrix} 1 & 2 & 3\\ 1 & 2 & 3\\ 1 & 2 & 3 \\ 1 & 2 & 3 \\ \end{pmatrix}$

Basic Arithmetic operations

Matrix product

Simply put, a $a \times b$ matrix multiplies a $b \times c$ matrix equals to a $a \times c$ matrix. If the number of columns of first matrix is not the same as the number of rows of the second matrix, these two matrices can not multiply each other.

Dot product

Concepts

Normal vector

Unit vector