Linear Algebra

  • matrix

This is a matrix ()


  • vector : an matrix

  • matrix addition
  • Just sum the number in the same position in matrix
  • only two matrix with same dimension can be added together
  • Scalar multiplication
  • take the all elements in matrix to multiple by the scalar
  • Matrix - vector multiplication

\begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \\ \end{bmatrix} \times \begin{bmatrix} 2 \\ 3\\ \end{bmatrix} = \begin{bmatrix} 1 \times 2 + 2 \times 3 \\ 3 \times 2 + 4 \times 3 \\ 5 \times 2 + 6 \times 3 \\\end{bmatrix} = \begin{bmatrix} 8 \\18\\ 28\\\end{bmatrix}


  • A neat trick

if we know the relationship of the price and the size of the house:

  • House size():
  • prediction datamatrix parameters
  • Matrix - matrix multiplication

\begin{bmatrix} 1 & 2 \\ 3 & 4 \\ 5 & 6 \\ \end{bmatrix} \times \begin{bmatrix} 2 &4 \\ 3&5\\ \end{bmatrix} = \begin{bmatrix} 1 \times 2 + 2 \times 3&1 \times 4 + 2 \times 5 \\ 3 \times 2 + 4 \times 3& 3 \times 4 + 4 \times 5 \\ 5 \times 2 + 6 \times 3& 5 \times 4 + 6 \times 5 \\\end{bmatrix} = \begin{bmatrix} 8 & 14\\18& 32\\ 28& 50\\\end{bmatrix}

  • Matrix multiplication properties
  1. Let A and B be matrixes, then in general:

2.

  • Identity matrix ( or )

%This is a 33 identity matrix

  • Matrix inverse and transpose

1.matrix inverse (the matrix must be square matrix)

  • if A is an matrix, and if A has an inverse:

  • if all element in matrix is zero, the matrix will not have an inverse matrix
  1. matrix transpose

if is a matrix, and , then

你可能感兴趣的:(Linear Algebra)