# A linear algebra problem - matrix equation

Let $\mathbf{v}_1,\mathbf{v}_2,\ldots,\mathbf{v}_n$ column vectors, each with the same $n$ components. So: $$\mathbf{v}_i = \left[\begin{array}{c}v_i\\ v_i \\\vdots \\ v_i\end{array}\right]$$ Also let $$\mathbf{b} = \left[\begin{array}{c}b\\ b \\\vdots \\ b\end{array}\right]$$ and $$\mathbf{C} = D(c_1,c_2,\ldots,c_n)$$ where $D(c_1,c_2,\ldots,c_n)$ denotes the diagonal square matrix with $c_1,c_2,\ldots,c_n$ on the diagonal.

All the $v$, $b$ and $c$ are known to be positive.

How would you solve the equation $$(\,(\mathbf{v}_1,\mathbf{v}_2,\ldots,\mathbf{v}_n)+\mathbf{C}\,)\,\mathbf{x} = \mathbf{b}$$ Any pointers in the right direction would be appreciated. I'm essentially looking for a formula for each of the $x_i$ (each component of the solution $\mathbf{x}$).

Is the determinant of $(\,(\mathbf{v}_1,\mathbf{v}_2,\ldots,\mathbf{v}_n)+\mathbf{C}\,)$ at least positive? That would at least guarantee that a solution always exists.

-

If you define $e=[1,1,1,\ldots,1]$ and $u=[v_1,v_2,\ldots,v_n]$, then the coefficient matrix can be written as $$C + eu^T.$$
Since $C$ is diagonal, it is invertible if all $c_i\neq0$. With the assumption of invertibility, you can apply Sherman-Morrison formula to obtain the inverse of the coefficient matrix, also assuming that $1+uC^{-1}e\neq 0$. The solution of a linear system is fairly straightforward once you know the inverse of a matrix.