Last modified on 15 May 2013, at 11:34

# Applied Mathematics/The Basics

## The Basics of linear algebraEdit

$\mathbf{A} = \begin{bmatrix} a_{11} & a_{12} & a_{12} & a_{14} \\ a_{21} & a_{22} & a_{23} & a_{24} \\ a_{31} & a_{32} & a_{33} & a_{34} \\ \end{bmatrix}.$

A matrix is composed of a rectangular array of numbers arranged in rows and columns. The horizontal lines are called rows and the vertical lines are called columns. The individual items in a matrix are called elements. The element in the i-th row and the j-th column of a matrix is referred to as the i,j, (i,j), or (i,j)th element of the matrix. To specify the size of a matrix, a matrix with m rows and n columns is called an m-by-n matrix, and m and n are called its dimensions.

### Basic operation[1]Edit

Operation Definition Example
Addition The sum A+B of two m-by-n matrices A and B is calculated entrywise:
(A + B)i,j = Ai,j + Bi,j, where 1 ≤ im and 1 ≤ jn.

$\begin{bmatrix} 1 & 3 & 1 \\ 1 & 0 & 0 \end{bmatrix} + \begin{bmatrix} 0 & 0 & 5 \\ 7 & 5 & 0 \end{bmatrix} = \begin{bmatrix} 1+0 & 3+0 & 1+5 \\ 1+7 & 0+5 & 0+0 \end{bmatrix} = \begin{bmatrix} 1 & 3 & 6 \\ 8 & 5 & 0 \end{bmatrix}$

Scalar multiplication The scalar multiplication cA of a matrix A and a number c (also called a scalar in the parlance of abstract algebra) is given by multiplying every entry of A by c:
(cA)i,j = c · Ai,j.
$2 \cdot \begin{bmatrix} 1 & 8 & -3 \\ 4 & -2 & 5 \end{bmatrix} = \begin{bmatrix} 2 \cdot 1 & 2\cdot 8 & 2\cdot -3 \\ 2\cdot 4 & 2\cdot -2 & 2\cdot 5 \end{bmatrix} = \begin{bmatrix} 2 & 16 & -6 \\ 8 & -4 & 10 \end{bmatrix}$
Transpose The transpose of an m-by-n matrix A is the n-by-m matrix AT (also denoted Atr or tA) formed by turning rows into columns and vice versa:
(AT)i,j = Aj,i.
$\begin{bmatrix} 1 & 2 & 3 \\ 0 & -6 & 7 \end{bmatrix}^\mathrm{T} = \begin{bmatrix} 1 & 0 \\ 2 & -6 \\ 3 & 7 \end{bmatrix}$

### Practice problemsEdit

(1) $\begin{bmatrix} 5 & 7 & 3 \\ 1 & 2 & 9 \end{bmatrix} + \begin{bmatrix} 4 & 0 & 5 \\ 8 & 3 & 0 \end{bmatrix} =$
(2) $4 \begin{bmatrix} -1 & 0 & -5 \\ 7 & 9 & -6 \end{bmatrix} =$
(3) $\begin{bmatrix} -2 & 5 & 7 \\ 0 & 0 & 9 \end{bmatrix}^\mathrm{T} =$

## Matrix multiplicationEdit

Multiplication of two matrices is defined only if the number of columns of the left matrix is the same as the number of rows of the right matrix. If A is an m-by-n matrix and B is an n-by-p matrix, then their matrix product AB is the m-by-p matrix whose entries are given by dot product of the corresponding row of A and the corresponding column of B[2]

$[\mathbf{AB}]_{i,j} = A_{i,1}B_{1,j} + A_{i,2}B_{2,j} + \cdots + A_{i,n}B_{n,j} = \sum_{r=1}^n A_{i,r}B_{r,j}$[3]

Schematic depiction of the matrix product AB of two matrices A and B.

### ExampleEdit

$\begin{bmatrix} -2 & 0 \\ 3 & 2 \end{bmatrix} \begin{bmatrix} 1 & 2 \\ 3 & -1 \end{bmatrix}$

$= \begin{bmatrix} -2+0 & -4+0 \\ 3+6 & 6+(-2) \end{bmatrix}$

$=\begin{bmatrix} -2 & -4 \\ 9 & 4 \end{bmatrix}$

### Practice ProblemsEdit

(1) $\begin{bmatrix} 1 & 0 \\ 2 & 2 \end{bmatrix} \begin{bmatrix} 4 \\ 2 \end{bmatrix} =$

(2) $\begin{bmatrix} 1 & 2 \\ 2 & 3 \end{bmatrix} \begin{bmatrix} 2 & 3 \\ 1 & 4 \end{bmatrix} =$

## Dot productEdit

A row vector is a 1 × m matrix, while a column vector is a m × 1 matrix.

Suppose A is row vector and B is column vector, then the dot product is defined as follows;

$A \cdot B= |A||B| cos \theta$

or

$\mathbf{A}\cdot \mathbf{B} = \begin{pmatrix}a_1 & a_2 & \cdots & a_n\end{pmatrix} \begin{pmatrix}b_1 \\ b_2 \\ \vdots \\ b_n\end{pmatrix} = a_1b_1+a_2b_2+\cdots+a_nb_n = \sum_{i=1}^n a_ib_i$

Suppose $\mathbf{A} = \begin{pmatrix}a_1 & a_2 & a_3\end{pmatrix}$ and $\mathbf{B} = \begin{pmatrix}b_1 \\ b_2 \\ b_3\end{pmatrix}$ The dot product is

$\mathbf{A}\cdot \mathbf{B} = \begin{pmatrix}a_1 & a_2 & a_3\end{pmatrix} \begin{pmatrix}b_1 \\ b_2 \\ b_3\end{pmatrix} = a_1b_1+a_2b_2+a_3b_3$

### ExampleEdit

Suppose $\mathbf{A} = \begin{pmatrix}2 \\ 1 \\ 3\end{pmatrix}$ and $\mathbf{B} = \begin{pmatrix}7 \\ 5 \\ 4\end{pmatrix}$

$\mathbf{A}\cdot \mathbf{B} = \begin{pmatrix}2 & 1 & 3\end{pmatrix} \begin{pmatrix}7 \\ 5 \\ 4\end{pmatrix}$

$= 2\cdot7+1\cdot5+3\cdot4$
$=14+5+12$

$=31$

### Practice problemsEdit

(1) $\mathbf{A} = \begin{pmatrix}3 \\ 2 \\ 5\end{pmatrix}$ and $\mathbf{B} = \begin{pmatrix}1 \\ 4 \\ 3\end{pmatrix}$

$\mathbf{A}\cdot \mathbf{B} =$

(2) $\mathbf{A} = \begin{pmatrix}1 \\ 0 \\ 3\end{pmatrix}$ and $\mathbf{B} = \begin{pmatrix}6 \\ 9 \\ 2\end{pmatrix}$

$\mathbf{A}\cdot \mathbf{B} =$

## Cross productEdit

Cross product is defined as follows:

$A \times B = |A||B| sin \theta$

Or, using detriment,

$\mathbf{A \times B}=\begin{vmatrix} e_x&e_y&e_z\\ a_x&a_y&a_z\\ b_x&b_y&b_z\\ \end{vmatrix} = (a_y b_z - a_z b_y, a_z b_x - a_x b_z, a_x b_y - a_yb_x)$

where $e$ is unit vector.

## ReferenceEdit

1. Sourced from Matrix (mathematics), Wikipedia, 28th March 2013.
2. Sourced from Matrix (mathematics), Wikipedia, 30th March 2013.
3. Sourced from Matrix (mathematics), Wikipedia, 30th March 2013.