# Help with understanding how to fine mean of matrix

• Mar 30th 2011, 06:03 AM
tomprice0189
Help with understanding how to find mean of matrix
Hi all,

Just a quick background...I am working on a final year computer science project that performs face recognition. As part of the project I need to perform a lot of vector/matrix manipulation. Below is a small extract from the paper I am following...

http://i54.tinypic.com/dqornm.jpg

The problem I am struggling to figure is out how the mean/variance is calculated from the equation. For example a subject x who has three face images will be represented as a matrix of 3840 rows and 3 columns, where each value represents a colour and each column represents a single image. Now the end result is to get a single value of variance for each subject, however I am struggling to see how to convert this matrix into first a mean value and then a variance value. The divide part of the equation is 1/N where in this case N would be 3, but I was under the impression that to get the average you would divide by the total number of elements?

I apologise for the long-windedness of the explanation, however if you require any further information please ask.

Tom
• Mar 30th 2011, 12:50 PM
pickslides
The context is still a little blurry here.

The common method here is to find the mean vector (1x3) the mean of each column and the covariance matrix (3x3) using the standard definition for the covariance between 2 variables.
• Mar 30th 2011, 01:06 PM
tomprice0189
Hi pickslides,

Thanks for your response. Yes I agree with you, as in a different part of the paper I have to do exactly as you outlined, however the way this bit is worded is as if it calculated in a somewhat different way.

I'll see if I can find any additional details that may help.