Suppose I have the following 3 by 3 matrix:p<-3X<-matrix(1/p,p,p)--$\pmb X$ is just a $p$ by $p$ matrix where every entry is $1/p$.Now I want to solve the system$$\pmb a\pmb X=\pmb 1_p$$where $\pmb 1_p$ is a vector of 1 of length $p$.I know $\pmb 1_p$ is the solution to such a system, but when I do, in R,solve(X,rep(1,p))I getError in solve.default(X, rep(1, p)) :   Lapack routine dgesv: system is exactly singular: U[2,2] = 0instead of $\pmb 1_p$. My question is why
why Lapack routine dgesv doesn't solve this?
r;lu
Your matrix does not have an inverse, which is why dgesv returns an error.