# Explanations on matrix transposition

I've never really worked with matrices so I would be glad about some information on the following issue:

In some statistic calculations there is often a transposed matrix within a formula. Can someone explain why there is a need to transpose matrices and what properties do they have afterwards?

Here is an example of the Shapiro-Wilk test for normality:

$a_{i} = \left[ (m^T V^{-1} V^{-1} m)^{\frac{1}{2}} \right] m^T V^{-1}$

where $V = \left( \begin{array}{*{3}, c} cov(m_1, m_1) & \cdots & cov(m_1, m_n) \\ \vdots & \ddots & \vdots \\ cov(m_n, m_1) & \cdots & cov(m_n, m_n) \end{array} \right)$

and $m_i = \Phi^{-1} \left( \frac{ i - \frac{3}{8}}{ n + \frac{1}{4}} \right)$

Why is $m_i$ a matrix and why should it be transposed for calculation?

-

Row and column vectors are very often considered as special cases of matrices that happen to have dimension $1$ in one direction. That allows one to write multiplication of matrices and vectors in general form without having to define everything for two cases separately. In your case, $m_i$ is not a matrix, but the column vector $m$ whose coordinates are $m_i$ can be considered as an $n\times1$ matrix.

The reasons for transposing things can be different in different contexts. Often they are related to the fact that the dot product between two vectors $x$ and $y$ can be written as the matrix multiplication $x^Ty$ (it may be instructive to actually draw this if you're not familiar with these things). In your case, $m^TV^{-1}V^{-1}m=m^TV^{-1}{}^TV^{-1}m=(V^{-1}m)^T(V^{-1}m)$ (since $V$ is symmetric and thus equal to its transpose), so that expression is just the dot product of $V^{-1}m$ with itself, i.e. the square of that vector.

-
Thank you, now I can work with the formula! – beyeran Apr 22 '11 at 11:39
@beyeran: as a terminological note, the quantity being rooted in the Shapiro-Wilk test is a quadratic form, which pops up a lot in statistical applications. – J. M. Apr 24 '11 at 15:57
Teeny nitpick: ${V^{-1}}^T$ might benefit from parenthesization, or there's the (you could say awkward) device $V^{-T}$... – J. M. Apr 24 '11 at 16:00

Why do you think that $m_i$ is a matrix? It seems that $m$ is a vector with coordinates $m_i$.

The vector $m$ is transposed, otherwise it could never be multiplied from the left with the matrices, and it is not $a_i=\dots$, it should be $a= \dots$ or $(a_i)=\dots$ as the expression on the right is already a vector and not its components.

-
Ahh ok, now it makes more sense. After the transposition of the vector I can use it as a set, as far as I know. – beyeran Apr 22 '11 at 11:23