Solving System of Linear Equations w/ Sum(solutions) = 1

69 Views Asked by At

It has been a while since I solved a system of linear equations. I know that for a $n \times n$ coefficient matrix $A$ I need to determine $A^{-1}$ and $x = A^{-1} b$. I am trying to solve a problem where $b$ is not explicitly given, but $\sum x$ must be $1$. I was wondering to how to solve this problem, especially converting the condition $\sum x = 1$. Fortunately, I do remember how to calculate the determinant of a square matrix. Any help will be appreciated. Thanks!

1

There are 1 best solutions below

0
On

You don't have to explicitly compute $A^{-1}$, as it is numerically unstable and very expensive and time-consuming. You usually compute something like a $LR$-Decomposition of $A$ and solve the system then.

To tackle the problem at hand:

The condition of $\sum x=1$ can be encoded by extending the matrix $A$. You then write $$\begin{bmatrix} &A& \\ 1 & \cdots & 1\end{bmatrix} x = \begin{bmatrix}b \\ 1\end{bmatrix}$$ and solve the extended system with that matrix. This system has one additional equation and can (usually) not be solved analytically, but you said something about a relaxation in $b$. To elaborate your uncertainty in $b$, you should supply more information.