Message Boards Message Boards

How do I manipulate block matrices without naming individual elements?

Posted 10 years ago

I have a block matrix of the form A = {{IdentityMatrix[n], a, 0},{-IdentityMatrix[n], 0, b}}, where a and b are n-length column vectors. Even if I input assumptions defining the dimensions of a and b, i.e.

$Assumptions = a \[Element] Vectors[n, Reals]&& b \[Element] Vectors[n, Reals]

when I do a calculation like A.Transpose[A], I still end up entries like a^2, which shows it is treating a and b as scalars instead of vectors.

I don't want to explicitly define the elements of a or b using other variables and combine everything with ArrayFlatten[], because I'd like to keep the results in terms of high-level operations, such as matrix multiplication, inverse, transpose, etc. Is there any way to achieve this?

POSTED BY: Nicholas Kitten
2 Replies

This construct A = {{IdentityMatrix[n], a, 0},{-IdentityMatrix[n], 0, b}} can not be transposed because it is not rectangular. Even the transformation behaviour of the elements in one super-row, i.e. {matrix, vector, scalar} does not fit. All this does not fit into the framework of multi-linear algebra. If A is intended as block matrix, then the vector a and the scalar 0 must be replaced by matrix blocks.

POSTED BY: Udo Krause
Posted 10 years ago

I don't think you're getting the thrust of my question. Yes, if I define a as a = Transpose[{{a1, a2, a3}}] and do the same for b and define n as 3 and use ArrayFlatten[] so that the scalar 0 is expanded into a column vector, WolframAlpha will be able to calculate with my matrix. I know how to do that, and it's not what I want, because if the answer includes a.a, what WolframAlpha will give me instead is a1^2 + a2^2 + a3^2, and now I have to do some difficult factorization to translate those scalar operations back into more compact and readable matrix operations. Make sense?

I would also like note here that that the matrix I wrote can be transposed, as written. Since n is undefined, IdentityMatrix[n] is left in symbolic form. Here's the result of Transpose[A].A, split over multiple lines for readability:

{{2 IdentityMatrix[n]^2,a IdentityMatrix[n],-b IdentityMatrix[n]}, {a IdentityMatrix[n],a^2,0}, {-b IdentityMatrix[n],0,b^2}}

I would actually be fine with this, if the symbolic multiplications were treated as non-commutive, e.g. b.a instead of a b, but because they're not, I can't trust any further calculations done this way.

POSTED BY: Nicholas Kitten
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract