Content deleted Content added
m →Definition: missed one |
m Dating maintenance tags: {{More footnotes needed}} |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1:
{{Use American English|date = March 2019}}
{{Short description|Matrix whose only nonzero elements are on its main diagonal}}
{{More footnotes needed|date=June 2025}}
In [[linear algebra]], a '''diagonal matrix''' is a [[matrix (mathematics)|matrix]] in which the entries outside the [[main diagonal]] are all zero; the term usually refers to [[square matrices]]. Elements of the main diagonal can either be zero or nonzero. An example of a 2×2 diagonal matrix is <math>\left[\begin{smallmatrix}
Line 48 ⟶ 49:
==Vector-to-matrix diag operator==
A diagonal matrix {{math|'''D'''}} can be constructed from a vector <math>\mathbf{a} = \begin{bmatrix}a_1 & \
<math display="block">
\mathbf{D} = \operatorname{diag}(a_1, \dots, a_n). </math> This may be written more compactly as <math>\mathbf{D} = \operatorname{diag}(\mathbf{a})</math>.
The same operator is also used to represent [[Block matrix#Block diagonal matrices|block diagonal matrices]] as <math>
The {{math|diag}} operator may be written as
<math display="block">
\operatorname{diag}(\mathbf{a}) = \left(\mathbf{a} \mathbf{1}^\textsf{T}\right) \circ \mathbf{I}, </math> where <math>\circ</math> represents the [[Hadamard product (matrices)|Hadamard product]], and {{math|'''1'''}} is a constant vector with elements 1.
==Matrix-to-vector diag operator==
The inverse matrix-to-vector {{math|diag}} operator is sometimes denoted by the identically named <math>\operatorname{diag}(\mathbf{D}) = \begin{bmatrix}a_1 & \
The following property holds:
<math display="block">
\operatorname{diag}(\mathbf{A}\mathbf{B}) = \sum_j \left(\mathbf{A} \circ \mathbf{B}^\textsf{T}\right)_{ij} = \left( \mathbf{A} \circ \mathbf{B}^\textsf{T} \right) \mathbf{1} </math> == Scalar matrix ==
<!-- Linked from [[Scalar matrix]] and [[Scalar transformation]] -->
A diagonal matrix with equal diagonal entries is a '''scalar matrix'''; that is, a scalar multiple {{mvar|λ}} of the [[identity matrix]] {{math|'''I'''}}. Its effect on a [[vector (mathematics and physics)|vector]] is [[scalar multiplication]] by {{mvar|λ}}. For example, a 3×3 scalar matrix has the form:
|