# Matrix Inverse: 3 Sources, 3 Different Answers

I have the following matrix:

$$\left( \begin{array}{ccc} 26 & 209.95 & 1699.0025 & 13778.493625 & 111977.48388125 & 911948.597109063\\ 209.95 & 1699.0025 &13778.493625 & 111977.48388125 & -911948.597109063 & 7442315.21214533\\ 1699.0025 & 13778.493625 & 111977.48388125 & -911948.597109063 & 7442315.21214533 & 60859617.3169286\\ 13778.493625 & 111977.48388125 & -911948.597109063 & 7442315.21214533 & -60859617.3169286 & 498674841.078199\\ 111977.48388125 & -911948.597109063 & 7442315.21214533 & -60859617.3169286 & 498674841.078199 & 4094065648.25843\\ 911948.597109063 & -7442315.21214533 & 60859617.3169286 & -498674841.078199 & 4094065648.25843 & 33676104461.2376\end{array} \right)$$

These are in exact values.

I inverted the matrix on Excel using the "MINVERSE" function and got the following matrix:

These values are also exact. As I was not getting the expected result upon performing some matrix multiplication with this inverse, I decided to try another source.

Here is what I got on matrixcalc.org:

While the top left cell on Excel has an exponent of "to the 12," the top left value in the second screenshot equates to $1320664.039$

I then went on to SAGEMath:

Here, once again, I get a different value for the top left-most value.

I am completely stumped. Can some one help me out?

• This matrix is what I call an "infernal contraption". Good Lord. Since that top left value is relatively small in comparison to lots of other values, perhaps there are accuracy issues in the rounding of decimals in those algorithms of those program? Your matrix is not the daily "bread and butter" matrix, neither are its entries... – imranfat Aug 1 '16 at 4:47

If we rationalize your original matrix, we have:

$$\left( \begin{array}{cccccc} 26 & \frac{4199}{20} & \frac{679601}{400} & \frac{110227949}{8000} & \frac{17916397421}{160000} & \frac{57979867907}{63578} \\ \frac{4199}{20} & \frac{679601}{400} & \frac{110227949}{8000} & \frac{17916397421}{160000} & -\frac{57979867907}{63578} & \frac{187017938966}{25129} \\ \frac{679601}{400} & \frac{110227949}{8000} & \frac{17916397421}{160000} & -\frac{57979867907}{63578} & \frac{187017938966}{25129} & \frac{677671838824}{11135} \\ \frac{110227949}{8000} & \frac{17916397421}{160000} & -\frac{57979867907}{63578} & \frac{187017938966}{25129} & -\frac{677671838824}{11135} & \frac{210440782935}{422} \\ \frac{17916397421}{160000} & -\frac{57979867907}{63578} & \frac{187017938966}{25129} & -\frac{677671838824}{11135} & \frac{210440782935}{422} & \frac{14812329515399}{3618} \\ \frac{57979867907}{63578} & -\frac{187017938966}{25129} & \frac{677671838824}{11135} & -\frac{210440782935}{422} & \frac{14812329515399}{3618} & \frac{12897948008654}{383} \\ \end{array} \right)$$

If we find the exact inverse, we get:

$$\left( \begin{array}{cccccc} \frac{151094150629430090531770022761422892881813177646981824074080369756519550414813453064019265164000552375211285291322288995991740800000000}{38717952041124379668801517657564101797448735634004166914071626046542342676087715841261531541633163428641175725656143731189929718319667991} & -\frac{2869879378134598047750390958826430698106072206680005553362548531908170171659509604803858235189613663145560666473351704090901120000000}{2978304003163413820677039819812623215188364279538782070313202003580180205852901218558579349356397186818551978896626440860763824486128307} & \frac{1066251411789993356568889347426837884791278256597115759789581674278979523370581423186595031968375969098406414071546639618560000000}{8943855865355597059090209669106976622187280118735081292231837848589129747306009665341079127196387948404059996686565888470762235694079} & \frac{7108874624148797368792324015425896042276714932423171794868652761788736602198365749194928323210289590697857901032054618598400000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{295400691551279766826061595618266749102142112386910159295868390452729919130971318979009809926986519310313873306342724279999274080000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{36053467956699043477155941196007119985023487175985177016772661832493039602497535067441690511688262028154204766488459150897547880000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} \\ -\frac{39106777920376274007866121354392670348951083153613534662582225672490596087164403391848204301711750781432354586256480629120000000}{2978304003163413820677039819812623215188364279538782070313202003580180205852901218558579349356397186818551978896626440860763824486128307} & \frac{4951203688585585437111209507008164788382894016741279137678280835297838467784926899595575338828297983536756099484742006400000000}{2978304003163413820677039819812623215188364279538782070313202003580180205852901218558579349356397186818551978896626440860763824486128307} & \frac{324560216171399071350949765980507257687285764201948064919923410145074067740842320818157806272677504819906702816458118502400000000}{8943855865355597059090209669106976622187280118735081292231837848589129747306009665341079127196387948404059996686565888470762235694079} & -\frac{23751937886844214037054660976418027408974278271970439334941430911366320807487294442921520735113850487899513268163107925920000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{550818949847627320025895338557736922125174509580705195451381815876992059692627139870251595338654990169112655869591584638870400000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{45262184796795350707465316734712389971700253260501525254924393119993544623495755942564706331122969910014616234490677473442600000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} \\ -\frac{403732137807392720836660105797899083850238310451642485199004703263276240287567245886331733140455954631170581297080953633280000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{12108465310344104159192604873523283007570990272209769962010617470030805570704125064775650839032364093614568526576977985894400000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{334434804346570864607044842733184362282488775373979595633882882797287053706198587704344850052079138796662551525548015632160000}{8943855865355597059090209669106976622187280118735081292231837848589129747306009665341079127196387948404059996686565888470762235694079} & -\frac{181442038089092922846222419543488942084844503932681263362064573245099819578712546048346956469611840417809322405407251353110400000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{45861919288583384872099408420895682919117190193495142991956685658548822051690852688613534655662758423529318129239836570880000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{5619668322295052189285034133775817602496394648011103719475336498112112647175954865109522804182951394852205793465822775944416000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} \\ \frac{12008509456945695654101310925944495747337397378497967698552827800378500237570087030027753909983157356671049123155615231436800000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{19900185253441736869824287934057242573962111066259491415485592596757798618817672989012372873916749720494293849335772074080000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{4945405786406233267197503686829095411350278140669192908554224010171988674682362475030686015425837609183215004510628615459200000}{8943855865355597059090209669106976622187280118735081292231837848589129747306009665341079127196387948404059996686565888470762235694079} & -\frac{857494041947924800224583902420437015347927719609486396149476412138593767055437483209110388613615817231099596176567040000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{5716079284558445677529333271277574661601184258167854696256971841010028447146021198871248817181792843357292911531728691200000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{700414552342142420722181139700142498096973966764933278174798710587581582381531454254934922217531109168048411288992241933280000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} \\ \frac{1474524059740511893893780575891829204074139411610478459912195739978402929258010187791769295391456156763099421626001699007274080000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{181435722191915931329875031817062693706463999305618502257478295806465024726191419547911451410719430084909285311445050142870400000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{2578174940197842340522671174702390991157509489319414853883570442066069604130253259011106725151873455796936615924215040000000}{8943855865355597059090209669106976622187280118735081292231837848589129747306009665341079127196387948404059996686565888470762235694079} & -\frac{60509960069655771317977217668516320278530901958529272936763055908018965127897480998501195080268809199884929309670400000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{353339228321182931658938972578692356505192291845083848948022499866110825426663568426292325333033088818706957410201590400000000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{43296023455598270194960258177008731950254075386218528970236409439690661138961582983105429884161223448061961781617604595160000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} \\ -\frac{35681421022351161514800621677512862869532545707476351851176862527093409340155807887828252699436899305563869860584579852427880000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{8810557746401981817782881848721225243499733084898811289355576008334522790030630339977523181996104673904631669697260340946200000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{29460880760579420713702355309565277267943223132285224764072367286545767124445785529383739732668853556336166117339874395232000}{8943855865355597059090209669106976622187280118735081292231837848589129747306009665341079127196387948404059996686565888470762235694079} & \frac{135384070912121972142785199633175968351075957479458690084843524629923570816930930619922295232471431245367451574020067862560000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & -\frac{8079982852015073917357536182521621319116252904545475220040984926854034400666335135813170508624828277146275050263050556051240000}{330922667018157091186337757756958135020929364393198007812578000397797800650322357617619927706266354090950219877402937873418202720680923} & \frac{1982218529201420982239742005310545992580882110824747118694130675456242620840963575745681211015453391193064460613535034854733267}{661845334036314182372675515513916270041858728786396015625156000795595601300644715235239855412532708181900439754805875746836405441361846} \\ \end{array} \right)$$

You can right click and copy the horrendous result as $Tex$ commands. I verified that the product of the two matrices above is the identity matrix.

Here is the numeric result with $50$-digits of precision:

$$\left( \begin{array}{cccccc} 0.0039024313700514175243136376675974998790087003361052 & -0.00096359517869443406110680991150897679438893108901958 & 0.00011921607725367793257714917734622027008004423561137 & 0.000021481981540293663447061447528765204245051483804459 & 0.00089265777473947319000642416382432502578866422579253 & -0.00010894831799092462570053141843922306948796706957186 \\ -\text{1.3130552784013620455731870301207349523834743541777506851046550481620113808507658141493204\grave{ }50.*{}^{\wedge}-8} & \text{1.662423877255864669280401320297491702689818461074652001076281755206552124345348111367832\grave{ }50.*{}^{\wedge}-9} & 0.000036288623280323284104493368742952374832672281984418 & -\text{7.1774889586336468217652269125464063344204970821312145195466965043562525899587791997465\grave{ }50.*{}^{\wedge}-11} & -\text{1.66449447180783461449053709963590391692563500015022963312563578650732238\grave{ }50.*{}^{\wedge}-6} & \text{1.3677571622590573874431783605132226728982471493065788921391999400357197\grave{ }50.*{}^{\wedge}-7} \\ -\text{1.22001959383834143287083621133997931871092627971235506254467476093213138\grave{ }50.*{}^{\wedge}-6} & 0.000036590014880061799823781389261723347388873192145347 & -\text{3.739268715655606498559033425571443339371425740392804893060530830294271\grave{ }50.*{}^{\wedge}-8} & -\text{5.4829135678136410850472911938992372280542383784651811902554232510099688\grave{ }50.*{}^{\wedge}-7} & -\text{1.3858802632600271362119657825034707200304119441644843936433312224769738\grave{ }50.*{}^{\wedge}-7} & \text{1.698181745279694540019181582635541352754709880920380823611941511484299\grave{ }50.*{}^{\wedge}-8} \\ 0.000036287962880121511298954039064305885238397697062598 & \text{6.0135455309713951762131400397050324147660010075419942838814268323079240647575290532016\grave{ }50.*{}^{\wedge}-11} & -\text{5.5293889580247722630238908768626157995242472969605887862373523910302124\grave{ }50.*{}^{\wedge}-7} & -\text{2.591221839454339188562086646104743648859814056912979178944767173829613585483708901459\grave{ }50.*{}^{\wedge}-12} & -\text{1.727315730912085083972706363513754717193077481720499429441386015695512\grave{ }50.*{}^{\wedge}-8} & \text{2.116550548360327397624622344141072257012823944147810931588188560534049912011037983986721\grave{ }50.*{}^{\wedge}-9} \\ \text{4.45579649477322624935335407127422629944061983074819503864373697116791907\grave{ }50.*{}^{\wedge}-6} & -\text{5.4827227106193031409741137749969286284889447517466512598669086727826845\grave{ }50.*{}^{\wedge}-7} & -\text{2.88262129780569442900522450908047952651921290948921660066385969718106496142598311309349\grave{ }50.*{}^{\wedge}-10} & -\text{1.82852267615550511749178645605841748751679780428438157638995275577879315471508716569\grave{ }50.*{}^{\wedge}-13} & -\text{1.067739576454567516240861597660684792847968250798538789054747861871874890178710839269587\grave{ }50.*{}^{\wedge}-9} & \text{1.30834263623357962783654208249844769310285498879070168204029495463849667638687016973444\grave{ }50.*{}^{\wedge}-10} \\ -\text{1.0782404645733557584072916032764037128919411668634559212349318782979539\grave{ }50.*{}^{\wedge}-7} & \text{2.662421956704030623365867237984515604103981621915313311328582582771961\grave{ }50.*{}^{\wedge}-8} & -\text{3.293979823031069293280702681959953606665263118542024617592777322297626007277890776828748\grave{ }50.*{}^{\wedge}-9} & \text{4.09110902350770998057613649304097181771302273588210714946328846035931887713741023649666\grave{ }50.*{}^{\wedge}-10} & -\text{2.44165288670653097820717829781311493988721465130995655245899058026117\grave{ }50.*{}^{\wedge}-8} & \text{2.994987540537167945779888787635516839221552861849828795474488323022949915321354685018069\grave{ }50.*{}^{\wedge}-9} \\ \end{array} \right)$$

• Hey Moo, thanks to your answer my computer screen moved itself all the way into my backyard!! – imranfat Aug 1 '16 at 5:20
• :-) As you said, that is a very nasty matrix! You can't even read it, but it seems like the OP needs to multiply by that monster and was losing precision using numerical results. Of course, this is a drawback of symbolic. Having said that, it is not clear why you'd need more than 32 digits of precision for anything. – Moo Aug 1 '16 at 5:22
• I used notepad++ to convert your input into a Mathematica friendly format - cause I didn't want to make an error with those crazy numbers. I then used Mathematica do the calculations and it allows you to copy results as $LaTex$. – Moo Aug 1 '16 at 5:25
• @Arjun: of course, one needs to be careful using these results too because at some point, when you go back to numerical using different number of digits - things get squirrely. If you do conversion on the rationalized matrix I show - play around with the precision of whatever you are using and you'll see what I mean. Compare the numerical top left entry between my result and Robert's. – Moo Aug 1 '16 at 5:35
• You could try Maxima or perhaps GP/Pari. The Excel issues could be due to rounding and such with these large numbers. I am not sure it can go beyond the standard numerical sizes, whereas CAS programs have infinite precision capability - but there can still be issues with numerical instabilities. – Moo Aug 1 '16 at 5:38

The exact inverse of your matrix can be found, e.g. in Maple, after converting the decimals to rational fractions. It's a bit big to reproduce here. The top left entry is

$${\frac{ 122860953596439155514261321730516392088568611128635950866447887098987633000000000000000 }{ 31483181110962484211441237960879117113256649632796147313161906101703943548454852562521097 }}$$ which is approximately $0.00390243137005170081856298035884$.

• Thanks for your answer. Do you know an free software that I could use to compute such inverses to a high degree of precision? – GoodChessPlayer Aug 2 '16 at 1:41