- 1,001
- 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?
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?