I get some unexpected behaviour from building block matrices of implicit matrices in Mathematica. Using this initial setup
$Assumptions =
A \[Element] Matrices[{3, 3}, Reals] &&
B \[Element] Matrices[{3, 3}, Reals] &&
a \[Element] Vectors[3, Reals] &&
b \[Element] Vectors[3, Reals] && \[Alpha] \[Element]
Reals && \[Beta] \[Element] Reals;
\[DoubleStruckCapitalA] = {{-\[Alpha], a\[Transpose]}, {a, A}};
\[DoubleStruckCapitalB] = {{-\[Beta], b\[Transpose]}, {b, B}};
1) For the product I get
{{\[Alpha] \[Beta] + b Transpose[a],
B Transpose[a] - \[Alpha] Transpose[b]}, {A b - a \[Beta],
A B + a Transpose[b]}}
But this is not correct, e.g. the top left should be αβ+Transpose[a].b. I've tried to exchange where I put the transpose, but with no difference. And b.Transpose[a] is not even a scalar! And Mathematica knows this from the fact that using TensorReduce returns "TensorDimenstions: Inhomogeneous dimensions in sum αβ+bTranspose[a]."
2) The transpose of the matrix is not correct:
Transpose[\[DoubleStruckCapitalA]]
Returns
{{-\[Alpha], a}, {Transpose[a], A}}
So it's missing the transpose of A.
I have plenty of more things that do not work, but I'd be happy if there is a way to get these examples to work.
I'm likely using this in the wrong way? If so, what is a good way to go?
Transposealtogether. Mathematica does not differentiate between row and column vectors so you often don't need to either. Then the result would be{{a b + α β, a B - b α}, {A b - a β, a b + A B}}. Would that be more along the lines of what you seek? – MarcoB Oct 07 '21 at 16:07