# Theoretical foundations

## A.1 Matrix Algebra

### Basic Manipulations and Properties

A column vector **x** with *d* dimensions can be written

$\mathbf{x}\equiv \left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ \vdots \\ {x}_{d}\end{array}\right]={\left[\begin{array}{cccc}{x}_{1}& {x}_{2}& \cdots & {x}_{d}\end{array}\right]}^{T},$

where the *transpose* operator, superscript *T*, allows it be written as a transposed row vector—which is useful when defining vectors in running text. In this book, vectors are assumed to be row vectors.

The transpose **A**^{T} of a matrix **A** involves copying all the rows of the original matrix **A** into the columns of **A**^{T}. Thus a matrix with *m* rows and *n* columns becomes a matrix with *n* rows and *m* columns:

$\begin{array}{ccc}\mathbf{A}\equiv \left[\begin{array}{cccc}{a}_{11}& {a}_{12}& \cdots & {a}_{1n}\\ {a}_{21}& {a}_{21}& \cdots & {a}_{2n}\\ \vdots & \vdots & \ddots & \vdots \\ {a}_{m1}& {a}_{m2}& \cdots & {a}_{mn}\end{array}\right]& \Rightarrow & {\mathbf{A}}^{\mathit{T}}=\left[\begin{array}{cccc}{a}_{11}& {a}_{21}& \cdots & {a}_{m1}\\ {a}_{12}& {a}_{21}& \cdots & {a}_{m2}\\ \vdots & \vdots & \ddots & \vdots \\ {a}_{1n}& {a}_{2n}& \cdots & {a}_{nm}\end{array}\right]\end{array}.$

The *dot product*

Get *Data Mining, 4th Edition* now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.