TITLE: Simplifying the determinant of the matrix whose $(i,j)$-th entry is $b_i c_j$ for $i=j$ and $-b_i c_j$ for $i\neq j$
QUESTION [6 upvotes]: $A$ is a $n \times n$ real matrix.
$A_{ij} = \begin{cases} \phantom{-}b_{i}c_{j} & \text{if } i = j \\ 
-b_{i}c_{j} & \text{if } i \ne j  \end{cases}$
How to simplify $\det(A)$?


Update:
Can I simplify the determinant with elementary row and column operations as described at http://www.maths.nuigalway.ie/~rquinlan/MA203/section2-5.pdf?

Divide each row by $b_{i}$ (elementary row operation)
Divide each column by $c_{j}$ (elementary column operation)

$\det(A) = \left(\prod_{i=1}^{n} b_{i} \right) \left(\prod_{j=1}^{n} c_{j} \right) \det(S)$
where $S_{ij} = \begin{cases} + 1 & \text{if } i = j \\ 
-1 & \text{if } i \ne j  \end{cases}$

So, the problem reduces to finding $\det(S)$.

REPLY [3 votes]: We can write $A = BSC$, where $S$ is the matrix you describe and
$$
B = \pmatrix{b_1\\ & b_2 \\ && \ddots\\ &&& b_n}, \quad 
C = \pmatrix{c_1\\ & c_2 \\ && \ddots\\ &&& c_n},
$$
so that as you noted, we have $\det(A) = \det(B)\det(C) \det(S)$.
In order to compute $\det(S)$, it suffices to note that
$$
S = 2I - \pmatrix{1 & \cdots & 1\\
\vdots & \ddots & \vdots \\
1 & \cdots & 1},
$$
which is to say that $S$ is a rank-one update of a scalar matrix.  One method to compute the determinant of such a matrix is by considering its eigenvalues: because $S$ has eigenvalues $2$ with multiplicity $n-1$ and $2-n$ with multiplicity $1$, we compute
$$
\det(S) = 2^{n-1}(2-n).
$$