Content deleted Content added
Rogerbrent (talk | contribs) m fix whitespace |
Rogerbrent (talk | contribs) →diag operator: split into matrix-to-vector and vector-to-matrix and add property |
||
Line 43:
In the remainder of this article we will consider only square diagonal matrices, and refer to them simply as "diagonal matrices".
==Vector-to-matrix diag operator==
A diagonal matrix <math>D</math> can be constructed from a vector <math>\mathbf{a} = \begin{bmatrix}a_1 & \dotsm & a_n\end{bmatrix}^\textsf{T}</math> using the <math>\operatorname{diag}</math> operator:
Line 51:
This may be written more compactly as <math>D = \operatorname{diag}(\mathbf{a})</math>.
The <math>\operatorname{diag}</math> operator may be written as:
Line 58:
where <math>\circ</math> represents the [[Hadamard product]] and <math>\mathbf{1}</math> is a constant vector with elements 1.
==Matrix-to-vector diag operator==
The inverse matrix-to-vector <math>\operatorname{diag}</math> operator is sometimes denoted by the identically named <math>\operatorname{diag}(D) = \begin{bmatrix}a_1 & \dotsm & a_n\end{bmatrix}^\textsf{T}</math> where the argument is now a matrix and the result is a vector of its diagonal entries.
The following property holds:
:<math>\operatorname{diag}(AB) = \sum_j (A \circ B^T)_{ij} </math>
== Scalar matrix ==
|