Linear Algebra

 

Linear Algebra

 

 

http://cs229.stanford.edu/section/cs229-linalg.pdf

http://www.deeplearningbook.org/contents/linear_algebra.html

 

 

Linear algebra is the math of vectors and matrices. Let n be a positive integer and let R denote the set of real numbers, then Rn is the set of all n-tuples of real numbers. A vector ~v 2 Rn is an n-tuple of real numbers. The notation “2S” is read “element of S.” For example, consider a vector that has three components:

 

 

Matrix + – * / :

subtraction (the inverse of addition)  matrix product. The product of matrices A 2 Rmn and B 2 Rn` is another matrix C 2 Rm` given by the formula

 

Matrix-vector product

Matrix-vector product The matrix-vector product is an important special case of the matrixmatrix product. The product of a 3  2 matrix A and the 2  1 column vector ~x results in a 3  1 vector ~y given by

 

Matrix Invers:

Inverse function f-1 undoes the effect of f so f-1(f(x)) = x.

inverse matrix linear algebra calculation

 

 

Matrix Transpose:

 

read.csv(“med.csv”)
read.csv(“med.csv”, header = T)
read.csv(“med.csv”, check.names = F) : don’t mess with titles
read.csv(“med.csv”, sep = ‘\t’)
read.csv(“med.csv”, sep = ‘;’)
read.csv(“med.csv”, stringsAsFactors=F)
read.csv(“med.csv”, header = TRUE, sep = “,”, quote = “\””)
read.csv(“med.csv”, sep = ‘;’, na.strings = c(‘?’, ‘!’))  replace ! ? with NA
read_excel(“med.xlsx or xls”)

 

 

linear systems

 

 

change of basis

 

Vector Space

 

Va fan är det här

va fan är det här?

 

 

Linear transformations

 

avbildning

linear algebra linear transformation

 

 

 

 

 

 

determinants

Determinante 3x3 linear algebra vector space

linear algebra calculating determinant

 

determinant linear algebra

 

 

 

Spaces

  • Subspace = Delvektorrum:
    • Hela Rn
    • Alla plan som går igenom origo
    • Alla linjer som går igenom origo
    • Alla noll vektorer
    • Om v tillhör Rn så tillhör (en konstant) x*v också Rn
    • Om a och b tillhör R så tillhör a*b också Rn

 

Bases

RANK1 = Line
RANK2 = Plane
RANK3 = 3D
RANK är number of dimensions in the output.
RANK = # PIVOTS = antal linj obr = dim(c(A))
C(A) = span(v1, v2, v3 … alla oberoende vektorer) 
dim ImA + dim Ker A = dim V
Ker A är det kolomnvektorer som skapas av t,s etc
Im A är de kolomnvektorer som innehåller pivot elementen
Radrum : ATv : v tillhör V
linear algebra ker Lm L: V W


Eigenvectors and eigenvalues

read.csv(“med.csv”)
read.csv(“med.csv”, header = T)
read.csv(“med.csv”, check.names = F) : don’t mess with titles
read.csv(“med.csv”, sep = ‘\t’)
read.csv(“med.csv”, sep = ‘;’)
read.csv(“med.csv”, stringsAsFactors=F)
read.csv(“med.csv”, header = TRUE, sep = “,”, quote = “\””)
read.csv(“med.csv”, sep = ‘;’, na.strings = c(‘?’, ‘!’))  replace ! ? with NA
read_excel(“med.xlsx or xls”)
Eigenvectors visualized Extended in gif eigenvectors