PDA

View Full Version : Solving 3D matrix equation


MikeyW
Jul21-11, 04:34 AM
Hi,

I'm pretty rusty with solving linear equations, my equations are:

ai = bijkcjk

i = 1,... n
j, k = 1,... m

Would like to know c, given a and b. Need somewhere to start, without having to cover 3 years of notes that I took 5 years ago, thanks if anyone can point me in the right direction!

Comments: I know I could compact j and k into a single dimension and reduce it to a "simple" matrix equation but this process discards valuable information that I need later on. Or at least makes it difficult to retrieve this information, so I'd like to explore a way of solving the equations outright. Thanks.

HallsofIvy
Jul21-11, 05:16 AM
I'm not sure that you can solve for the individual values of c. It looks to me like you will have more uknown values than equations. If the indices run from 1 to 3, c will have 9 values but because of the contraction on both i and k, you will have only three equations.

MikeyW
Jul21-11, 06:55 AM
Good point, I forgot to mention that. Let's say n = m^2, and the equations are consistent.

kdbnlin78
Jul21-11, 09:02 AM
Yep - I think HallsofIvey is correct. The term we could use here is an underdetermined system.

That Neuron
Jul21-11, 08:34 PM
I'm not sure that you can solve for the individual values of c. It looks to me like you will have more uknown values than equations. If the indices run from 1 to 3, c will have 9 values but because of the contraction on both i and k, you will have only three equations.

Yeah for a system of equations (unless those are complex nums, which I thought on first glance) you need the num of differing equations= the num of variables.

MikeyW
Jul22-11, 04:28 AM
Ok, that condition is satisfied by setting n=m^2, now i,j = 1,... m, k = 1,... m^2 so we have m^2 equations in m^2 unknowns.

Ben Niehoff
Jul22-11, 12:01 PM
If n = m^2, then this is simple. First you need to "unwrap" c_jk into a single column vector c_l, where l now runs from 1 to m^2. b_ijk must be similarly unwrapped into b_il. In both cases, this is easily accomplished by defining

l = 3(j-1) + (k-1) + 1 = 3j + k - 3

l now runs from 1 to 9 as j and k run from 1 to 3, with each value of j and k being mapped to a unique l. Notice all I've done here is expand l in base 3. For general m^2, you would have

l = m(j - 1) + (k - 1) + 1 = mj + k - m

Once you have re-written your equation as

a_i = b_il c_l

it is easy to solve by standard linear algebra.

Finally, since each (j,k) pair maps to a unique l, it is also easy to get back c_jk the way you want it.