我们可以看到,必须以多种方式实现这一点,每种方式都意味着不可逆性:
1)行列式m
为零:
> det(m) [1] -2.685852e-12
2) m具有零特征值,即eigen(m)$values[3]
.等效地,nullspace m
是非null - 它等于跨越的1维空间eigen(m)$vectors[, 3]
> e <- eigen(m); e $values [1] 1.180000e+02 1.800000e+01 -6.446353e-15 $vectors [,1] [,2] [,3] [1,] -0.2881854 9.486833e-01 0.1301889 [2,] -0.4116935 1.110223e-16 -0.9113224 [3,] -0.8645563 -3.162278e-01 0.3905667 > N <- e$vector[, 3] # nullspace > m %*% N # shows that N is indeed mapped to zero [,1] [1,] 5.329071e-15 [2,] 0.000000e+00 [3,] 0.000000e+00
3)的列m
是不线性独立的.特别是m[,1]
在其他列上的回归给出了完美的拟合(即拟合值相等m[, 1]
),因此从线性模型的系数得到我们的 7 * m[,2] - 3 * m[, 3]
等于m[, 1]
.
> fm <- lm(m[, 1] ~ m[, 2] + m[, 3] + 0) > all.equal(fitted(fm), m[, 1]) # perfect fit [1] TRUE > coef(fm) m[, 2] m[, 3] 7 -3 > all.equal(7 * m[, 2] - 3 * m[, 3], m[, 1]) [1] TRUE
4) cholesky分解在其对角线上为零:
> chol(m, pivot = TRUE) [,1] [,2] [,3] [1,] 9.486833 2.529822 4.4271887 [2,] 0.000000 4.427189 0.6324555 [3,] 0.000000 0.000000 0.0000000 attr(,"pivot") [1] 3 1 2 attr(,"rank") [1] 2 Warning message: In chol.default(m, pivot = TRUE) : the matrix is either rank-deficient or indefinite
5) m
不是满级,即等级小于3:
> attr(chol(m, pivot = TRUE), "rank") [1] 2 Warning message: In chol.default(m, pivot = TRUE) : the matrix is either rank-deficient or indefinite
注意:输入可通过以下方式重复给出:
m <- matrix(c(26, 14, 24, 14, 20, 42, 24, 42, 90), 3)
问题是列不是线性独立的.
第一列*-1/3 +第二列*7/3等于第三列.
-m[, 1] * 1/3 + 7/3 * m[, 2] # [1] 24 42 90