hopbalt,
1. Can you have a dot product for two matrices that are NOT vectors and NOT identical dimensions? Everything I've seen suggests that only vector matrices with exactly the same dimensions can be used in a dot product.
Oddly enough, the answer is both yes and no. The dot product is only defined for vectors, but they do not have to be what we normally think of as vectors.
In fact, any mathematical object with a specific set of properties can be considered a vector in a specific vector space. Those properties are:
1) X + Y must be a vector in the same vector space, for any vectors X and Y.
2) X + Y = Y + X.
3) aX must be a vector in the vector space for all scalars a and all vectors X.
4) A unique null vector 0 must exist such that X + 0 = X for all X.
5) For every vector X there must be a vector X' such that X + X' = 0.
6) a(X + Y) = aX + aY.
7) (a + b)X = aX + bX.
if these criteria are met, then you have a vector space, and you can define an inner product for the space. A dot-product is simply what we call an inner product when the vectors are expressed in terms of basis vectors which are orthogonal according to the inner product. In other words, if we have an N-dimensional vector space, and an inner-product defined for that space, then we can always find a set of N vectors such that the inner-product of any pair of them is zero. We can then right our vectors using the normal notation [x1, x2, ... xn], where each component refers to the corresponding basis vector. Using that notation, our inner product will look like an ordinary dot product, regardless of what the actual vectors are, or how our inner product is defined.
If thats not true, how would find the dot product of [1, 2; 3, 4] with [5, 6; 7, 8] Note that semicolon denotes a new row, and commas denote a new column, so both of these are 2 x 2 matrices.
Well, the set of 2x2 matrices qualifies as a 4-dimensional vector space. I can define an inner-product for that space as follows.
X * Y = X11 * Y11 + X12 * Y12 + X21 * Y21 + X22 * Y22
Using that inner product, the following matrices are orthogonal:
[1, 0; 0, 0], [0, 1; 0, 0], [0, 0; 1, 0], [0, 0; 0, 1]
I can then write your matrices in standard notation as [1, 2, 3, 4] and [5, 6, 7, 8]. The dot product is thus 70.
2. Is the trace of a matrix defined ONLY for square matrices? What about for scalars? I'm assuming the trace of 5 is just 5, or is it not defined?
The trace is only defined for square matrices. A scalar can be considered a 1 x 1 matrix, so I guess that works.
Dr. Stupid