# Reply To: Failed to Compute inverse

Home 21090308 Forums Numerical Method Linear Algebra Failed to Compute inverse Reply To: Failed to Compute inverse

#5456
Ryu
Member

Hi,

Does your matrix look like what is in the picture?

If so, it should give an error instead of giving any estimators. You are expected to get the errors you reported.

We verified this in R, and see the same computational error.

a1 = c(0.45093285, 0.774907749, 0.84057971, 0.257559176, 0, 0, 1, 1, 1, 1, 1, 0.626531316, 0.621771218, 0.610766046, 0.245458241, 0.424345781, 0, 1, 1, 1, 1, 1, 0.619625129, 0.553505535, 0.364389234, 0.387167381, 0.869364387, 0, 1, 1, 1, 1, 1, 0.549145422, 0.636531365, 0.732919255, 0.607204278, 0.924726346, 0, 1, 1, 1, 1, 1, 0.384004452, 0.833948339, 0.966873706, 0.566523874, 0.891621818, 0, 1, 1, 1, 1, 1, 0.241693666, 0.813653137, 0.786749482, 0.527281824, 1, 0, 1, 1, 1, 1, 1, 0.561613183, 1, 0.869565217, 0.640755449, 1, 0, 1, 1, 1, 1, 1, 0.597707051, 0.577490775, 0.335403727, 0.472217879, 1, 0, 1, 1, 1, 1, 1, 0.597707051, 0.577490775, 0.335403727, 0.315640537, 1, 0, 1, 1, 1, 1, 1, 0.975715322, 0.522140221, 0.465838509, 0.915043307, 1, 0, 1, 1, 1, 1, 1, 0.544035993, 0.643911439, 0.600414079, 0.325443232, 0.897900612, 0, 1, 1, 1, 1, 1, 0.477930595, 0.326568266, 0.316770186, 0.08326819, 1, 0, 1, 1, 1, 1, 1, 0.630518931, 0.695571956, 0.708074534, 0.250023451, 0.882048872, 0, 1, 1, 1, 1, 1, 0.476065194, 0.688191882, 0.465838509, 0.133610581, 0.920471748, 0, 1, 1, 1, 1, 1, 0.513690232, 0.446494465, 0.275362319, 0.150558144, 1, 0, 1, 1, 1, 1, 1, 0.664625455, 0.485239852, 0.480331263, 0.074638066, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0.14824427, 1, 0, 1, 1, 1, 1, 1, 0.655185686, 0.293357934, 0.424430642, 0.125386949, 1, 0, 1, 1, 1, 1, 1, 0.871893925, 0.577490775, 0.708074534, 0.428285545, 0.916300784, 0, 1, 1, 1, 1, 1, 0.536569345, 0.732472325, 0.80952381, 0.594571777, 1, 0, 1, 1, 1, 1, 1, 0.884839411, 0.708487085, 0.782608696, 0.901160064, 1, 0, 1, 1, 1, 1, 1, 0.74839652, 0.73800738, 0.819875776, 0.449360558, 1, 0, 1, 1, 1, 1, 1, 0.740239297, 0.813653137, 0.770186335, 0.484944186, 1, 0, 1, 1, 1, 1, 1, 0.892628256, 0.566420664, 0.48447205, 0.566492605, 0.893944596, 0, 1, 1, 1, 1, 1, 0.641782467, 0.701107011, 0.561076605, 0.268878397, 0.819217329, 0, 1, 1, 1, 1, 1, 0.727327283, 0.880073801, 0.799171843, 0.450767643, 0.972246793, 0, 1, 1, 1, 1, 1, 0.902106646, 0.804428044, 0.848861284, 0.530283606, 0.932805054, 0, 1, 1, 1, 1, 1, 0.703258643, 0.63099631, 0.65010352, 0, 1, 0, 1, 1, 1, 1, 1, 0.703258643, 0.63099631, 0.65010352, 0, 1, 0, 1, 1, 1, 1, 1, 0.674344101, 0.614391144, 0.432712215, 0.248710172, 0.95322955, 0, 1, 1, 1, 1, 1, 0.770054158, 0.723247232, 0.749482402, 0.164222507, 0.985764519, 0, 1, 1, 1, 1, 1, 0.770054158, 0.723247232, 0.749482402, 0.164222507, 0.985764519, 0, 1, 1, 1, 1, 1, 0.944049798, 0.846863469, 0.836438923, 0.506800913, 0.701970526, 0, 1, 1, 1, 1, 1, 0.906254034, 0.723247232, 0.749482402, 0.024389481, 0.658539602, 0, 1, 1, 1, 1, 1, 0.906254034, 0.723247232, 0.749482402, 0.024389481, 0.658539602, 0, 1, 1, 1, 1, 1, 0.932987464, 0.745387454, 0.523809524, 0.327100466, 0.724177421, 0, 1, 1, 1, 1, 1, 0.838641695, 0.610701107, 0.422360248, 0.322722867, 0.880022, 0, 1, 1, 1, 1, 1, 0.909062229, 0.730627306, 0.66873706, 0.526656452, 0.960764737, 0, 1, 1, 1, 1, 1, 0.909062229, 0.730627306, 0.66873706, 0.121447109, 0.960764737, 0, 1, 1, 1, 1, 1, 0.906034849, 0.32103321, 0.453416149, 0.460507802, 1, 0, 1, 1, 1, 1, 1, 0.682885597, 0.666051661, 0.633540373, 0.622963635, 0.826177285, 0, 1, 1, 1, 1, 1, 0.721453267, 0.568265683, 0.6563147, 0.64682155, 1, 0, 1, 1, 1, 1, 1, 0.602505014, 0.7699877, 0.816425121, 0.307953681, 0.853345019, 0, 1, 1, 1, 1, 1, 0.733845545, 0.686346863, 0.82815735, 0.488258654, 1, 1, 0, 0, 0, 0, 0, 0.629304206, 0.671586716, 0.670807453, 0.348644508, 0.865313241, 1, 0, 0, 0, 0, 0, 0.630726452, 0.701107011, 0.296066253, 0.370469967, 0.893924125, 1, 0, 0, 0, 0, 0, 0.785452447, 0.535055351, 0.275362319, 0.248178606, 1, 1, 0, 0, 0, 0, 0, 0.985401189, 0.531365314, 0.50310559, 0.678277727, 0.945731406, 1, 0, 0, 0, 0, 0, 0.917575558, 0.557195572, 0.308488613, 0.266439448, 0.48458827, 1, 0, 0, 0, 0, 0, 0.917575558, 0.557195572, 0.308488613, 0.266439448, 0.48458827, 1, 0, 0, 0, 0, 0, 0.928787902)
a2= c(0.798892989, 0.604554865, 0.404677777, 0.898840383, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.958602018, 0.636531365, 0.409937888, 0.372314812, 0.331412703, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 1, 0.749077491, 0.625258799, 0.36712423, 0.976965081, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.903650297, 0.756457565, 0.677018634, 0.315218411, 0.928172432, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.903650297, 0.756457565, 0.677018634, 0.315218411, 0.928172432, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.846782669, 0.638376384, 0.755693582, 0.295331603, 0.727667269, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.724377256, 0.712177122, 0.85300207, 0.583096213, 0.927591512, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.695372133, 0.682656827, 1, 0.686376286, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.817957979, 0.71402214, 0.65010352, 0.541039992, 0.769990836, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.844949271, 0.767527675, 0.869565217, 0.740658516, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.610304168, 0.588560886, 0.409937888, 0.421218849, 0.907618697, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.938698051, 0.741697417, 0.677018634, 0.556236515, 0.840436522, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.735672079, 0.647601476, 0.583850932, 0.384540821, 0.749338731, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.754992802, 0.629151292, 0.577639752, 0.273005847, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.864139037, 0.658671587, 0.540372671, 0.31459304, 0.904513724, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.971212643, 0.619926199, 0.855072464, 0.479722335, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.689819104, 0.413284133, 0.672877847, 0.197117038, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.677712365, 0.466789668, 0.333333333, 0.264782214, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.733685421, 0.374538745, 0.103519669, 0.086801538, 0.748769706, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.728019531, 0.728782288, 0.832298137, 0.199149495, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.494870017, 0.726937269, 0.722567288, 0.395609893, 0.918620988, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.467207547, 0.8099631, 0.552795031, 0.286638942, 0.32716574, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.503985229, 0.693726937, 0.679089027, 0.272818236, 0.84815487, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.674833805, 0.354243542, 0.314699793, 0.219286451, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.72291715, 0.601476015, 0.689440994, 0.395734968, 0.280413263, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.885553306, 0.867158672, 0.931677019, 1, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.766590782, 0.518450185, 0.265010352, 0.190988399, 1, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736, 0.7129194, 0.613468635, 0.48447205, 0.292079672, 0.663824665, 0.146597261, 0.474820144, 0.477292202, 0.472868217, 0.578947368, 0.48944736)
a = c(a1, a2)

m1 = matrix(a, 11, 78)
m2 = t(m1)
> factanal(m2, factors = 5)
Error in solve.default(cv) :
system is computationally singular: reciprocal condition number = 1.71141e-16