2
$\begingroup$

Ok, I am trying to solve an equation involving matrices (well, tensors actually), which is of the form: $\mathbf{e}^{T} \cdot \mathbf{M} \cdot \mathbf{e}$ = $\mathbf{N}$, where $\mathbf{e}$ is an unknown matrix and both $\mathbf{M}$ and $\mathbf{N}$ are known ($\mathbf{M}$ contains variables).

Essentially, I am trying to find the values of the components of $\mathbf{e}$ (x,y,z,t) in terms of a,b,c,d. Here is a 2-d example of what I have tried so far, but I hope to do this in 4-dimensions eventually.

metric = ({{a, b},{c, d}});
eta = ({{1, 0},{0, -1}});
vb = ({{x, y},{z, t}});
neta = Transpose[vb].metric.vb; (* Need to set this equal to eta and solve for x, y, z, t *)
neta == eta 
(* Need to do something like Solve[%, {x,t,y,z}] but I get {} if I do that *)

Thanks!

$\endgroup$
6
  • 1
    $\begingroup$ The problem is that this system imposes a constraint on the parameters {a,b,c,d}, hence is empty for "generic" values of the params. You can see this by explicitly allowing for such a situation: Solve[Flatten[neta - eta] == 0, {x, y, z, t}, MaxExtraConditions -> 1] $\endgroup$ Oct 2, 2014 at 16:09
  • $\begingroup$ Thank you. If I do that I get the conditions that b == c (i.e. there is only a solution if the matrix is symmetric?). Let's suppose I have a symmetric matrix, is there a way I can solve this and spit out the matrix vb? (Containing only a,b,c,d). $\endgroup$
    – Akoben
    Oct 2, 2014 at 16:32
  • $\begingroup$ No, not quite. You can change metric to {{a,b}, {b,d}} but then the system is underdetermined. If you then do vb /. Solve[Flatten[neta - eta] == 0, {x, y, z, t}] you get a result that still contains x. $\endgroup$ Oct 2, 2014 at 16:39
  • $\begingroup$ If I do that, I actually get a vector of matrices, some of which have x in some do not. For example, If I do vb /. Solve[Flatten[neta - eta] == 0, {x, y, z, t}][[6]] I get a matrix without x in. What's going on here? $\endgroup$
    – Akoben
    Oct 2, 2014 at 17:03
  • $\begingroup$ It means the Solve thinks solution set has isolated zero dimensional components (points) as well as one dimensional families of solutions. I suspect these isolated ones are actually special values of the dimensional components though. $\endgroup$ Oct 2, 2014 at 17:16

1 Answer 1

1
$\begingroup$

Given a matrix:

eta = ({{1, 0}, {0, -1}});

one can decompose this into three matrices in the following way:

{u, w, v} = SingularValueDecomposition[eta];
(* Where the original eta is defined by: *)
u.w.Transpose[v]  (* = eta *)

Another way, which more appropriately addresses your problem is to use Schur decomposition.

 eta = ({{1, 0}, {0, -1}});
{q, t} = QRDecomposition[eta];
 q.t.Conjugate[Transpose[q]]  (* = eta *)

I think this latter method should work. The Mathematica documentation says this is how to reproduce the original matrix, but I am finding that the following gives back the original matrix:

q.t  (* = eta *)

Thats odd...

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.