0

I am trying to follow this you this video LDA example : LDA video example from Youtube

On 7th minute if video formula to calculate co-variance matrix is given , and direct output of co-variance matrix is given as without explaining the mathematical steps:

 [[1/3 1/6],[1/6 1/3]]

I tried to solve the maths manually and my problem is if i calculate

(x- means(x)) * (x- means(x))transpose

i don't get the result. But instead if i use

(x- means(x))transpose * (x- means(x))

I get accurate result.

Please explain what is right formula because everywhere it is written as (x- means(x)) * (x- means(x))transpose

But Matrix multiplication is NOT commutative .i.e. It is NOT true that AB=BA

`

user8588795
  • 321
  • 2
  • 14
  • 1
    I'm voting to close this question as off-topic because it is a math problem. Please post at [math.se]. – Nico Schertler Nov 15 '19 at 03:47
  • 2
    It is a matter of convention. If your `x` is a column vector, you use the first formulation. If it is a row vector, you use the second one. One gives you a matrix (outer product), the other gives you a scalar (inner product). – Nico Schertler Nov 15 '19 at 03:48
  • thanks for help.. You you mentioned is right – user8588795 Dec 13 '19 at 21:40

0 Answers0