title: How to calculate variance between observations, when observations are in matrix form each
body: <p>I have a cluster of 250 observations. each observation is a 4 by 9 matrix.
  4 is number of variable parameters observed and 9 is number of days, observations were collected.</p>
  <p>I want to know the variance between 250 observations which are in matrix form. as I ve studied so far, variance is calculated among one dimension variables.
  any suggestion for data in matrix form?</p>
  <pre><code>mat1 &lt;- matrix(c(0:69),10,7)
  mat2 &lt;- matrix(c(3:72),10,7)
  mat3 &lt;- matrix(c(0:69),10,7)
  ...
  var &lt;- var(mat1,mat2, mat3,..)
  </code></pre>
  <p>for these three matrices, var() returns a 7 by 7 matrix of 9.166667 for all elements. I do not know what r is doing. or how to get to this.</p>