Transpose of a matrix and related concepts
Given a matrix, the simplest thing you can do to it is to view it sideways (rotating the numbers suitably). This turns the rows into columns and vice versa. This simple minded operation has some nice properties.
The transpose of
is often denoted as
. If
has type p X q, then its transpose has size q X p. Another popular notation for the transpose is a superscript
, so the transpose of
is
.
Example:
> A:=randmatrix(3,4,entries=rand(-10..10));`transpose of A`:=transpose(A);
> B:=randmatrix(4,3,entries=rand(-10..10));`transpose of B`:=transpose(B);
> evalm(transpose(A&*B)),evalm(transpose(B)&*transpose(A));
>
The above equality is saying
. The reversal of the order is crucial! There is a natural proof by formula or pictures in the book. Check it. There is a formal proof at the end.
Since the operation of inverse also satisfies a similar reversal, we get a wonderful identity. First of all, it is a matter of checking from definition that
. For convenience, name
, so
and
. Now, taking transposes, note that
, so the inverse of
is
or the transpose of the inverse of
. Let
denote
.
Then we can check that
equals
. This has theoretical uses.
A matrix is symmetric if it is equal to its transpose, i.e.
. It is antisymmetric (or skewsymmetric) if it is equal to the negative of its transpose, i.e.
. Both of these concepts have important geometrical consequences.
Earlier we discussed dot products of two vectors and also wondered about which way of writing a vector is the right way. The transpose gives a natural way of handling this.
Given a vector
and another vector
, we note that their
dot product can be
also written as an ordinary matrix product
where each side is simply a matrix product resulting into a 1 X 1 matrix or scalar.
> v := matrix([[x], [y], [z]]);w:=matrix([[p], [q], [r]]);
> evalm(transpose(v)&*w),evalm(transpose(w)&*v);
Symmetric matrices have many nice properties. In particular, its
decomposition takes on the shape
and can be worked out quite fast. This has important uses in defining and using dot products in abstract vector spaces.
We illustrate how this is done. We are going to perform a row operation on A followed by the same operation on its columns. The matrix
is simply recording the steps as shown.
It is a good Maple exercise to try and write a procedure for these steps yourself!
> A:=matrix(3,3,[1,2,1,2,3,3,1,3,0]);L:=eye(3);
> A1:=addrow(A,1,2,-2);A1:=addcol(A1,1,2,-2);L[2,1]:=2;
> A2:=addrow(A1,1,3,-1);A2:=addcol(A2,1,3,-1);L[3,1]:=1;
> A3:=addrow(A2,2,3,1);A3:=addcol(A3,2,3,1);L[3,2]:=-1;
Checking
> evalm(L&*diag(1,-1,0)&*transpose(L));
Note that in the above procedure, we only modified entries of
. We did not print it along the way.
>