Solve Matrices System: Help with I, A, b, C

  • Context: Undergrad 
  • Thread starter Thread starter debro5
  • Start date Start date
  • Tags Tags
    Matrices
Click For Summary

Discussion Overview

The discussion revolves around solving a system of equations involving matrices and vectors, specifically focusing on how to determine the vector of currents (b) given a set of matrices (A's) and a resultant matrix (C). The context includes both theoretical and applied aspects related to matrix operations and optimization.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant presents a system of equations involving matrices A and a vector b, leading to a resultant matrix C, and seeks to find the vector b.
  • Another participant points out the need for clarity regarding the dimensions and types of the matrices and vectors involved, suggesting that the original formulation may be incorrect.
  • It is clarified that the A's are n x n real matrices and that the b's are scalars, which some participants initially misunderstood.
  • A participant suggests that the problem can be reformulated as a matrix-vector equation, emphasizing that the solution may not be unique.
  • One participant introduces the concept of minimizing the difference between C and the sum of the products of matrices A and scalars b, indicating a desire for an approximate solution rather than an exact one.
  • Another participant discusses the possibility of using an invertible matrix to simplify the problem, while also noting that if no matrices are invertible, alternative methods may be required.
  • There is a suggestion to convert the problem into a standard matrix-vector form to facilitate finding a solution, including the use of pseudo-inverses for cases where matrices are not invertible.

Areas of Agreement / Disagreement

Participants express differing views on the formulation of the problem and the methods to solve it. While there is some consensus on the need to clarify dimensions and the nature of the matrices and vectors, the discussion remains unresolved regarding the best approach to find the vector b.

Contextual Notes

Participants highlight limitations in the original problem statement, including unclear definitions and potential misunderstandings about the dimensions of the matrices and vectors involved. The discussion also reflects the complexity of the problem due to the non-uniqueness of solutions.

debro5
Messages
5
Reaction score
0
I have this system :
[tex](A_1 \quad A_2 \quad A_3 \;...)\left( {\matrix{<br /> {b_1 } \cr <br /> {b_2 } \cr <br /> {b_3 } \cr <br /> {...} \cr <br /> } } \right) = C[/tex]

where the A's are matrices that forms a vector, b is a vector and C a matrix. If I know C and the A's. How can I find the b's?

[tex]\left( {\matrix{<br /> {b_1 } \cr <br /> {b_2 } \cr <br /> {b_3 } \cr <br /> {...} \cr <br /> <br /> } } \right) = (A_1^{ - 1} \quad A_2^{ - 1} \quad A_3^{ - 1} \;...)C[/tex]

Surely not, this give another matrix. The A's are square but not necessarely invertable...
 
Last edited by a moderator:
Physics news on Phys.org
You'll have to be a bit more specific about the types of your vectors/matrices.
 
A's and B are n x n real matrices...
 
There is no B in what you wrote. But there are (so far undefined) bi's and a C.And currently, that expression is gibberish. On the left hand side, your multiplicand is a 1x? array, and your multiplier is a 1x? array. (Why don't you tell us the number of entries?) But multiplication is only defined when the number of columns in the multiplicand equals the number of rows in the multiplier.

And unless the bi's happen to be nx1 arrays, multiplication of the individual elements of your two big arrays doesn't make sense.
Oh, I've looked at your source code, I think you meant:

[tex] \left(<br /> \begin{array}{c c c}<br /> A_1 & A_2 & \cdots<br /> \end{array}<br /> \right)<br /> \cdot<br /> \left(<br /> \begin{array}{c}<br /> b_1 \\<br /> b_2 \\<br /> \vdots<br /> \end{array}<br /> \right)<br /> = C[/tex]

(click the image to see how to draw it yourself)This is better, since this multiplication is defined (assuming each bi is an nx1 array of numbers, and C is an nx1 array of numbers, and each ellipsis represents the same number of omitted entries). All you have to do is to forget the partitions; this is an ordinary matrix * vector = vector problem. The solution (if one exists) won't be unique, though.
 
Last edited:
sorry, should have been C...

In fact, the A's represents the gradient of a magnetic field over a given array of current carrying coils. Each coil carry a current b. The A's are numerically computed and I already know the final C. So I have to find the b currents...
Hope that helps...

Yes, that is what I meant. But each A is a matrix. So this is not a simple matrix*vector=vector problem, it's more of
a sum over i(matrix(i)*scalar(i))=matrix...
 
Last edited:
(see the addition to my previous post)
 
Incidentally, if you want to keep it in block form, then you can just find one A that's invertible, then you can multiply by its inverse.

For example, if I have
[tex] \left(<br /> \begin{array}{c c c}<br /> A & B & C<br /> \end{array}<br /> \right)<br /> \cdot<br /> \left(<br /> \begin{array}{c}<br /> x \\ y \\ z<br /> \end{array}<br /> \right)<br /> = v[/tex]

and A is invertible, then I can left multiply by its inverse:


[tex] \left(<br /> \begin{array}{c c c}<br /> I & A^{-1}B & A^{-1}C<br /> \end{array}<br /> \right)<br /> \cdot<br /> \left(<br /> \begin{array}{c}<br /> x \\ y \\ z<br /> \end{array}<br /> \right)<br /> = A^{-1}v[/tex]

and I can read off the solutions in the same way I would for the ordinary case -- my pivot was the first column, so I can pick any value I want for y and z, and then x is uniquely determined.

If none of A, B, or C are invertible, then you have to do some tricky stuff to stay in the block form.
 
This is a better formulation of the problem:

[tex]\sum\limits_{i = 1}^N {A_i } b_i \; = \;C[/tex]

...each [tex]A_i[/tex] is a matrix...

solution is not unique, but I'm trying to find the b's that minimize:

[tex]C - \sum\limits_{i = 1}^N {A_i } b_i \;[/tex]
 
Last edited:
That's why you have to say what things are -- I would never have guessed that the bi's were scalars!If you were looking to actually solve that system, then you can turn it into a matrix * vector = vector problem with some rearranging. I'll demonstrate on a smaller example:

If you have the equation
[tex] x<br /> \left(<br /> \begin{array}{cc}<br /> 1 & 2 \\<br /> 3 & 4<br /> \end{array}<br /> \right)<br /> +<br /> y<br /> \left(<br /> \begin{array}{cc}<br /> 5 & 6 \\<br /> 7 & 8<br /> \end{array}<br /> \right)<br /> =<br /> \left(<br /> \begin{array}{cc}<br /> 9 & 10 \\<br /> 11 & 12<br /> \end{array}<br /> \right)[/tex]

then the matrix structure is irrelevant: it's just an array of 4 numbers, and this can be unfolded into a system of four scalar equations. Refolding them into a matrix * vector = vector product, you have:

[tex] \left(<br /> \begin{array}{cc}<br /> 1 & 5 \\<br /> 2 & 6 \\<br /> 3 & 7 \\<br /> 4 & 8<br /> \end{array}<br /> \right)<br /> \left(<br /> \begin{array}{c}<br /> x \\ y<br /> \end{array}<br /> \right)<br /> =<br /> \left(<br /> \begin{array}{c}<br /> 9 \\<br /> 10 \\<br /> 11 \\<br /> 12<br /> \end{array}<br /> \right)[/tex]But you seem to suggest that you don't want to solve it, but approximately solve it. Well, you'll have to first come up with a metric on the solution space. I suspect you'll first need to convert the problem into a matrix * vector = vector problem, as I did above. A common way to measure how close a solution is, is simply the length of the error vector:

If we're trying to solve Ax = b, and we have a candidate solution y, then the (squared) error is given by

[tex]e(y)^2= ||Ay - b||^2 = (Ay - b)^T(Ay - b) = y^T A^T A y - b^T A y - y^T A^T b + b^T b<br /> = y^T A^T A y - 2 y^T A^T b + b^T b[/tex]To minimize, we set the derivative to zero:

[tex]0 = 2 A^T A y - 2 A^T b[/tex]

which means that the "best" solution to Ax = b is the actual solution to

[tex]A^T A y = A^T b[/tex]
 
Last edited:
  • #10
Yes, thank you. I didn't think of the unfolding procedure. This will help.
The part with the error I already knew, but it's okay. So to find the b's, I could now try to invert A or try to find it's pseudo-invert?
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 62 ·
3
Replies
62
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
4
Views
2K
  • · Replies 34 ·
2
Replies
34
Views
3K
Replies
8
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K