How can a diagonal matrix be represented in matrix form?

Click For Summary

Discussion Overview

The discussion revolves around the representation of a diagonal matrix in matrix form, particularly how to elegantly express a vector as a diagonal matrix. Participants explore various notations and methods, including common conventions and personal preferences.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests using the notation \operatorname{diag}(a_1, a_2, \cdots, a_n) to represent a diagonal matrix derived from a vector.
  • Another participant mentions that some prefer to denote a diagonal matrix with a superscript D, such as a^D, and discusses the use of different notations for vectors and matrices.
  • A participant proposes using a vector multiplied by a bold 1, represented as a1, as a method to express a diagonal matrix.
  • Several participants engage in a side discussion about the age of the thread and the relevance of delayed responses, with some expressing frustration over perceived inaccuracies in earlier posts.
  • One participant highlights a previous post as providing a nearly perfect answer but critiques the suggestion to define the notation \operatorname{diag}(\vec a) explicitly.

Areas of Agreement / Disagreement

Participants express differing opinions on the best notation for representing diagonal matrices, with no consensus reached on a single preferred method. There is also contention regarding the accuracy of previous answers and the value of revisiting older discussions.

Contextual Notes

Some participants note the importance of defining notations clearly to avoid confusion, while others express frustration over the need for such definitions. The discussion reflects varying conventions in mathematical notation and personal preferences.

hotvette
Homework Helper
Messages
1,001
Reaction score
11
Perhaps a silly question. I have a vector:

a=[a_1 \ a_2 \ a_3 \ ...\ a_n]^T

that I want to turn into a diagonal matrix. Is there an elegant way to represent this? I thought maybe something like:

a^TI

would do, but it doesn't. I suppose I can use the kronecker delta and subscript form:

b_{ij} = \delta_{ij}a_i

but how would this be done in matrix form?
 
Physics news on Phys.org
I think it is common notation to denote a diagonal matrix such as
\begin{pmatrix}<br /> \lambda_1 &amp; 0 &amp; 0 &amp; \cdots &amp; 0 \\<br /> 0 &amp; \lambda_2 &amp; 0 &amp; \cdots &amp; 0 \\ <br /> 0 &amp; 0 &amp; \lambda_3 &amp; &amp; \vdots \\<br /> \vdots &amp; 0 &amp; 0 &amp; \ddots &amp; 0 \\ <br /> 0 &amp; 0 &amp; 0 &amp; 0 &amp; \lambda_n \\<br /> \end{pmatrix}<br />
as
\operatorname{diag}(\lambda_1, \lambda_2, \cdots, \lambda_n).
So you could write
\operatorname{diag}(a_1, a_2, \cdots, a_n)
and everyone will know what you mean, and you can even write
\operatorname{diag}(\vec a)
to mean just that (though you should define it explicitly, just to be clear).
 
<br /> \operatorname{diag}(\lambda_1, \lambda_2, \cdots, \lambda_n)<br /> seems OK but does not look good in long equations.

Some writers prefer to add a superscript D as in a^D.
I always use small letters for vectors and capital letters for matrices. And if you combine this rule with the difference between braces and brackets, then the case is also resolved. In general braces (\{...\}) are used to denote vectors, and brackets for matrices ([...]). So a small letter in brackets is nothing but a diagonal matrix with the elements of a vector as its diagonal entries.
If you would like...
 
you can use a vector times a bold 1, i.e a1
 
boman131 said:
you can use a vector times a bold 1, i.e a1

This thread is 3 years old... :frown:
 
This thread is 3 years old... :frown:

So what? This information stays online for years. A delayed answer might not help the person who asked the question in the first place, but it could help the larger community.
 
jbgm said:
So what? This information stays online for years. A delayed answer might not help the person who asked the question in the first place, but it could help the larger community.

Wow... and you registered just to make that remark? :)
 
jbgm said:
So what? This information stays online for years. A delayed answer might not help the person who asked the question in the first place, but it could help the larger community.

But the answer is wrong, and was already mentioned in the thread as being wrong.
 
jbgm said:
So what? This information stays online for years. A delayed answer might not help the person who asked the question in the first place, but it could help the larger community.
A nearly perfect answer was given over 5 years ago in post #2:

CompuChip said:
\operatorname{diag}(a_1, a_2, \cdots, a_n)
and everyone will know what you mean, and you can even write
\operatorname{diag}(\vec a)
to mean just that (though you should define it explicitly, just to be clear).

My only gripe: the parenthetical remark though you should define it explicitly, just to be clear. I can see only two possible outcomes if some reviewer said that about my use \operatorname{diag}(\vec a) in some math:
  • Aggressive. Reject the comment with
    Really?! Are you serious? We lost the people who don't understand \operatorname{diag}(\vec a) on page 2.
  • Passive aggressive. Modify the offending equation with
    \mathrm A = \cdots \operatorname{diag}(\vec a) \cdots \ \ \text{where} \operatorname{diag}(\vec a) = \sum\nolimits_i a_i e_i e_i^T
 

Similar threads

  • · Replies 33 ·
2
Replies
33
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 27 ·
Replies
27
Views
2K
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
6K
  • · Replies 6 ·
Replies
6
Views
2K