|Bill Allombert on Thu, 19 Dec 2002 11:53:49 +0100|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|Re: don't understand inverseimage|
On Thu, Dec 19, 2002 at 11:16:49AM +0100, Ramón Casero Cañas wrote: > Bill Allombert wrote: > > On Tue, Dec 17, 2002 at 11:10:42PM +0100, email@example.com wrote: > > > matinverseimage(A,Y) return a solution of AX=Y if it exists, and [;] else. > > Um, I have another question linked to Bill's answer. Let's say the > matrix is invertible. Each time that a vector's inverse image is to be > computed, the matrix has to be inverted (or whichever process it > follows), isn't it? That doesn't seem efficient from a computational > point of view (and I'm not saying that that function was written with > that idea, or maybe it's more efficient that way than inverting the > matrix and then use the inverse as a linear mapping, I don't know). I've > been reading other functions descriptions, and I haven't found anything > like "inverse(A)". 1) To inverse a matrix, use A^-1 or 1/A. 2) If A is invertible, you should rather use matsolve() than matinverseimage(). 3) matsolve(A,X) is faster than computing A^-1, but not much, so you are right, it is best to compute A^-1 if you have many vectors X. Cheers, Bill.