matrix

  • matrix dimension = no of rows * columns
  • matrix is numbers written in rows and columns
  • Vector is a n*1 matrix

Matrix addition and subtraction

  • We can only add or subtract matrices of same dimension and result is matrix of same dimension

Multiplication

(3*2 ) * (2*1) = 3*1 matrix First row -> 1*1+ 3*5

We can now pose h(x) as a matrix

represent h(x) into matrix

now we can do

  • for (i=1 to 1000)
    • prediction(i) = .... and train our set

Matrix matrix multiplication

Competing hypothesis

  • Apply all 3 hypothesis simultaneously
  • You can get prediction of each hypothesis in resulting matrix

Matrix mult is not commutative

But matrix mult is associative

  • a*b*c = (a*b)*c = a*(b*c)

Identity matrix (1's along diagonals)

identity property:

A.I = I.A = A

Inverse and Transpose

  • in maths we have 3*3(Inverse) = 1(Identity) ...-> 3*1/3 = 1
  • number 0 does not have inverse in real numbers
  • AA(inverse) = A(inverse)A = I
  • Note: only square matrices have inverses

  • If A is matrix with all 0 it does not have an inverse

  • intuition matrix does not have inverse (singular matrix, degenerate matrix) if its too close to 0

Transpose

results for ""

    No results matching ""