help to resolve a intricate equation [message #55649] |
Tue, 28 August 2007 19:12  |
highstone
Messages: 10 Registered: August 2007
|
Junior Member |
|
|
hello all
there is a equation like
X^2+A*X=C+A
where X is a matrix to resolve, A is a known matrix, C is a constant
(actually X,A is a grid image)
is there any method can resolve this type equation such as least-
squares method or others? can be based on IDL ?
I am not well up in maths, please as particular as possible, thank
you.
|
|
|
Re: help to resolve a intricate equation [message #55742 is a reply to message #55649] |
Sun, 09 September 2007 09:38  |
Sven Geier
Messages: 17 Registered: July 2002
|
Junior Member |
|
|
kuyper wrote:
>
> I believe so. He indicated that the value of 'A' is known; it is 'X'
> that he describes as "a matrix to resolve". For scalars, the quadratic
> equation could be used to solve such an equation; but that doesn't
> work with matrices. I seem to remember learning an approach that can
> be used, but I don't remember what it was.
Oh, duh. You're right, of course: e did say that A was known.
I had taken the phrase "X,A are grid images" as indication that the poster
wasn't clear on how IDL handles math with arrays in the same way as
scalars. In this case, of course, this would be a quadratic equation to
solve, not the simple thing I wrote.
If we're talking real matrix algebra, then it isn't clear to me what
the "C+A" would be about: if C is a matrix then why is it called "a
constant", but if it isn't then "C+A" isn't really a valid operation. Hum.
-- S
--
http://www.sgeier.net
My real email address does not contain any "Z"s.
|
|
|
Re: help to resolve a intricate equation [message #55743 is a reply to message #55649] |
Sun, 09 September 2007 06:48  |
James Kuyper
Messages: 425 Registered: March 2000
|
Senior Member |
|
|
Sven Geier wrote:
> highstone wrote:
>
>> hello all
>> there is a equation like
>> X^2+A*X=C+A
>> where X is a matrix to resolve, A is a known matrix, C is a constant
>> (actually X,A is a grid image)
>>
>> is there any method can resolve this type equation such as least-
>> squares method or others? can be based on IDL ?
>>
>> I am not well up in maths, please as particular as possible, thank
>> you.
>
>
> I am probably completely misunderstanding what you're trying to do, but...
>
> X^2 + A*X = C+A
>
> => X^2 -C = A (1-X)
>
> => A = (X^2 -C)/(1-X)
Please note that X and A are matrices; C might be as well - he wasn't
clear on that point. If X^2 and A*X are to be interpreted as element-
by-element multiplication of two matrices, then your approach works.
However, if they refer to true matrix multiplications, then you have
to do something different. If X is a square matrix, and I is the
identity matrix of the same size, and if (I-X) is invertible, then
what you can do is:
A = (X^2 - C)*inverse(I-X)
> but you probably meant something entirely different...
I believe so. He indicated that the value of 'A' is known; it is 'X'
that he describes as "a matrix to resolve". For scalars, the quadratic
equation could be used to solve such an equation; but that doesn't
work with matrices. I seem to remember learning an approach that can
be used, but I don't remember what it was.
|
|
|
Re: help to resolve a intricate equation [message #55746 is a reply to message #55649] |
Sat, 08 September 2007 22:09  |
Sven Geier
Messages: 17 Registered: July 2002
|
Junior Member |
|
|
highstone wrote:
> hello all
> there is a equation like
> X^2+A*X=C+A
> where X is a matrix to resolve, A is a known matrix, C is a constant
> (actually X,A is a grid image)
>
> is there any method can resolve this type equation such as least-
> squares method or others? can be based on IDL ?
>
> I am not well up in maths, please as particular as possible, thank
> you.
I am probably completely misunderstanding what you're trying to do, but...
X^2 + A*X = C+A
=> X^2 -C = A (1-X)
=> A = (X^2 -C)/(1-X)
but you probably meant something entirely different...
-- S
--
http://www.sgeier.net
My real email address does not contain any "Z"s.
|
|
|