How can a diagonal matrix be represented in matrix form?

In summary, the author is trying to do a diagonal matrix where each element is the sum of the other elements multiplied by a number raised to the power of i.
  • #1
hotvette
Homework Helper
996
5
Perhaps a silly question. I have a vector:

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

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

[tex]a^TI[/tex]

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

[tex]b_{ij} = \delta_{ij}a_i[/tex]

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

Some writers prefer to add a superscript [tex] D[/tex] as in [tex]a^D[/tex].
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 ([tex]\{...\}[/tex]) are used to denote vectors, and brackets for matrices ([tex][...][/tex]). 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...
 
  • #4
you can use a vector times a bold 1, i.e a1
 
  • #5
boman131 said:
you can use a vector times a bold 1, i.e a1

This thread is 3 years old... :frown:
 
  • #6
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.
 
  • #7
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? :)
 
  • #8
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.
 
  • #9
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:
[tex]\operatorname{diag}(a_1, a_2, \cdots, a_n)[/tex]
and everyone will know what you mean, and you can even write
[tex]\operatorname{diag}(\vec a)[/tex]
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 [itex]\operatorname{diag}(\vec a)[/itex] in some math:
  • Aggressive. Reject the comment with
    Really?! Are you serious? We lost the people who don't understand [itex]\operatorname{diag}(\vec a)[/itex] on page 2.
  • Passive aggressive. Modify the offending equation with
    [tex]\mathrm A = \cdots \operatorname{diag}(\vec a) \cdots \ \ \text{where} \operatorname{diag}(\vec a) = \sum\nolimits_i a_i e_i e_i^T[/tex]
 

1. What is a diagonal matrix from a vector?

A diagonal matrix from a vector is a square matrix where all the elements outside the main diagonal are zero, and the elements on the main diagonal are the values of the vector. This means that the matrix is filled with zeros except for the main diagonal, which contains the same values as the vector.

2. What is the purpose of creating a diagonal matrix from a vector?

The main purpose of creating a diagonal matrix from a vector is to simplify calculations in linear algebra. Diagonal matrices have many useful properties, such as being easy to invert and having simpler determinant and eigenvalue calculations. They are also useful for representing and solving systems of linear equations.

3. How is a diagonal matrix from a vector created?

To create a diagonal matrix from a vector, the vector is placed on the main diagonal of a square matrix, and all other elements are set to zero. This can be done manually or using programming languages such as MATLAB or Python.

4. Can a non-square vector be used to create a diagonal matrix?

No, a non-square vector cannot be used to create a diagonal matrix. The vector must have the same number of elements as the dimensions of the resulting matrix. For example, a 3x3 vector is needed to create a 3x3 diagonal matrix.

5. What are some applications of diagonal matrices from vectors?

Diagonal matrices from vectors have many applications in mathematics, engineering, and physics. They are commonly used in solving systems of linear equations, finding eigenvalues and eigenvectors, and performing transformations in computer graphics and image processing. They are also useful in data compression, signal processing, and machine learning algorithms.

Similar threads

  • Linear and Abstract Algebra
Replies
2
Views
574
  • Linear and Abstract Algebra
Replies
2
Views
284
  • Linear and Abstract Algebra
Replies
12
Views
1K
  • Linear and Abstract Algebra
Replies
1
Views
1K
Replies
4
Views
891
Replies
27
Views
1K
  • Advanced Physics Homework Help
Replies
15
Views
1K
Replies
2
Views
1K
  • Differential Equations
Replies
7
Views
2K
  • Linear and Abstract Algebra
Replies
4
Views
848
Back
Top