3

Assume $c$ is a column vector. What mathematical operation or expression can produce a diagonal matrix with entries of that of $c$ in same order. Does such an expression exist?

Basically I know that the sum of entries of $c$ is zero. I want to write it in an matrix expression/equation. I am hoping if I get a diagonal matrix and then say trace of that matrix is zero.

Widawensen
  • 8,517
Rajesh D
  • 4,347

4 Answers4

3

The usual notation used for this kind of thing is as follows: if $c = (c_1,\dots,c_n)$ (a column-vector in your case), then we say $$ \operatorname{diag}(c) = \pmatrix{c_1 \\&\ddots \\&& c_n} $$ where the blank entries are zeros.

Ben Grossmann
  • 234,171
  • 12
  • 184
  • 355
2

Let $K$ be a field. Then define the mapping $T:K^n \to K^{n \times n}$ by

$$ T((c_1,c_2,...,c_n)^T)= diag (c_1,c_2,...,c_n).$$

Fred
  • 78,422
1

One standard way is to let $e=(1,\ldots,1)^T$ be the all-ones column vector of the same length and then write $e^Tc=0$.

1

Transformation can be made with the use of standard basis vectors $e_i$ which are columns of identity matrix.

Then $\text{diag}(c_1,\dots, c_n)= (e_1^Tc)e_1e_1^T+ \dots +(e_n^Tc)e_ne_n^T$.

Widawensen
  • 8,517
  • Expression $(e_1^Tc)$ should be here treated as a scalar, in fact it can be treated as a scalar product, as this thread https://math.stackexchange.com/questions/2167231/how-does-the-dot-product-convert-a-matrix-into-a-scalar shows, more exactly we could write it as $\text{tr}(e_1^Tc)$ – Widawensen Nov 14 '19 at 09:36