Math Tools for Neuroscience (NEU 314) Spring 2016 Jonathan Pillow - - PowerPoint PPT Presentation

math tools for neuroscience neu 314 spring 2016
SMART_READER_LITE
LIVE PREVIEW

Math Tools for Neuroscience (NEU 314) Spring 2016 Jonathan Pillow - - PowerPoint PPT Presentation

Math Tools for Neuroscience (NEU 314) Spring 2016 Jonathan Pillow Princeton Neuroscience Institute & Psychology. accompanying notes/slides for Thursday, Feb 4 discussion items course website:


slide-1
SLIDE 1

Jonathan Pillow Princeton Neuroscience Institute & Psychology.

Math Tools for Neuroscience (NEU 314) Spring 2016

accompanying notes/slides for Thursday, Feb 4

slide-2
SLIDE 2

discussion items

  • course website: http://pillowlab.princeton.edu/teaching/mathtools16/
  • sign up for piazza.
  • take math-background poll
  • for Matlab newbies:
  • check out MATLAB for neuroscientists (Lewis Library),

chapter 2

  • either of the matlab tutorials posted on course website (just

first part, up through vectors & matrices).


  • Today: “Intro to linear algebra: vectors and some of the

basic stuff you can do with ‘em.”

  • Next week: start of labs!
slide-3
SLIDE 3

today’s topics

  • vectors (geometric picture)
  • vector addition
  • scalar multiplication
  • vector norm (“L2 norm”)
  • unit vectors
  • dot product (“inner product”)
  • linear projection
  • orthogonality
slide-4
SLIDE 4

vectors

  • v =

    

v1 v2 . . . vN

    

vN v

1 v2

v

1

v2 v v3 v2 v

1

v

slide-5
SLIDE 5

column vector

  • v =

    

v1 v2 . . . vN

    

% make a 5-component % column vector v = [1; 7; 3; 0; 1];

in matlab transpose

% transpose v'

row vector

% create row vector by % separating with , % instead of ; v = [1, 7, 3, 0, 1];

slide-6
SLIDE 6

addition of vectors

translated

w w v v v

slide-7
SLIDE 7

scalar multiplication

2

v v v

slide-8
SLIDE 8

vector norm (“L2 norm”)

  • vector length in Euclidean space

v

1

v2 v

In 2-D: In n-D:

slide-9
SLIDE 9

vector norm (“L2 norm”)

v = [1; 7; 3; 0; 1]; % make a vector % many equivalent ways to compute norm norm(v) sqrt(v'*v) sqrt(v(:).^2) sqrt(v(:).*v(:))
 
 
 % note use of .* and .^, which operate % 'elementwise' on a matrix or vector

in matlab

slide-10
SLIDE 10

unit vector

v

1

v2 v

  • in 2 dimensions

unit circle

  • vector such that
slide-11
SLIDE 11

unit vector

  • in n dimensions
  • vector such that
  • sits on the surface of an n-dimensional hypersphere
slide-12
SLIDE 12

unit vector

  • make any vector into a

unit vector via

  • vector such that
slide-13
SLIDE 13

inner product (aka “dot product”)

  • produces a scalar from two vectors

φvw

b

. .

w w v v b w w

. v

slide-14
SLIDE 14

linear projection

.

v

u ^

v u

^ u ^

( )

  • intuitively, dropping a vector down onto a linear surface

at a right angle

  • if u is a unit vector,

length of projection is


  • for non-unit vector, length of projection =
slide-15
SLIDE 15

linear projection

.

v

u ^

v u

^ u ^

( )

  • intuitively, dropping a vector down onto a linear surface

at a right angle

  • if u is a unit vector,

length of projection is


  • for non-unit vector, length of projection =

}

component of v in direction of u

slide-16
SLIDE 16
  • rthogonality
  • two vectors are orthogonal (or “perpendicular”) if their

dot product is zero:

.

v

u ^

v u

^ u ^

( )

}

component of v in direction of u component of v

  • rthogonal to u