2016년 10월 8일 토요일

Tensors for Convinience #1 : Kronecker Delta



 During my Linear Algebra lecture from the Mathematical Physics class, our professor introduced the Kronecker delta tensor ( but he mainly introduced it as a function ) while explaining inner products between two vectors. Using some tensor tools, things can by way more convenient.

 Before starting with the Kronecker delta, we need another tool, the Einstein sum convention, and this will make everything super-light. It's simple : discard the sigma.

\[ \vec{x} = \sum_{i=1}^{n}x_i \hat{e}_i \quad when \quad \vec{x}=\left( x_{1}, x_{2} , \dots , x_{n} \right)  \]

 And using the Einstein notation, 

\[ \vec{x} = x_i \hat{e}_i   \]

 it is way more simple. There's actually more to talk about subscripts and superscripts, which is important using the Einstein notation, let's us know whether the component is a vector or a covector, but I'll skip this and only use subscripts in this post. I'll explain about vectors and covectors in later posts.

 First, let's express inner products between two vectors.

\[ \vec{x} \cdot \vec{y} = ( x_i \hat{e}_i )\cdot ( y_j \hat{e}_j) =  x_i y_j(\hat{e}_i \cdot \hat{e}_j)  \]

 Now, what would $\hat{e}_i \cdot \hat{e}_j$ be...? 




 We can get some clues from the results of the inner products between $\hat{e}_i$s, or the basis vectors of an orthogonal coordinate system, or to think easily just think of the $R^3$. We know that $\hat{e}_i \cdot \hat{e}_j$ when $i = j$ is 1. But when we inner product two orthogonal vectors, $\hat{e}_i \cdot \hat{e}_j$ when $i \neq j$, we get 0. And this property of basis vectors of an orthogonal coordinate could be easily expressed by using the Kronecker delta tensor. It is defined as,

\[ \delta_{ij} = \begin{Bmatrix} 0 \quad (i \neq j) \\ 1 \quad ( i=j) \end{Bmatrix} \]

and we could apply this to express $\hat{e}_i \cdot \hat{e}_j$.

\[ \hat{e}_i \cdot \hat{e}_j = \delta_{ij} \]

 So, we can express the inner product using the Kronecker delta.

\[ \vec{x} \cdot \vec{y} = \delta_{ij} x_i y_j  \]

 The next step is important.  But wait..... isn't i and j already different, and thus it makes the whole thing 0? NO. The indices i and j are like variables, they can become 1 or 3 or etc, thus it means that they are not a constant number or a fixed value we don't know. We need some flexibility dealing with these indices and think of two possibilities, differed by the equality between them. When the indices have different values, they all disappear as $\delta_{ij}=0$. Meanwhile, when the indices are identical, $\delta_{ij}=1$ and it makes $x_i y_j$ 'alive'. Thus, $\delta_{ij} x_i y_j $ could be reduced by,

\[ \delta_{ij} x_i y_j = \delta_{ii} x_i y_i = x_i y_i \]   

 Thus we obtain an already known definition of inner products,

\[ \vec{x} \cdot \vec{y} =  x_i y_i  \]

 The Kronecker delta can be used as a function as we did, but actually they are tensors. I'll explain about it in detail after some posts.





aesthEDIT3.OCT.2016



infinite.CS6





always stuck on


the


god damn


transparent png


window


for infinite years


2016


2016년 10월 7일 금요일

aesthEDIT2.OCT.2016



スレーブconsumeの世





aesthEDIT1.OCT.2016



endlessのsuffering






whatever


you do


the struggle is real



2016

2016년 10월 6일 목요일

Pre-ordered limited vinyl arrived







 A month ago, it was very lucky for me to visit Botanical House's fb page, because unless I did it I would have never known about the pre-order of this album, and thus I had a chance to get this golden piece. 


 I really love this album "ランプ幻想" by Lamp, a Japanese indie band, because it gives me so many memories. The first moment I got to know about their music was about an year ago from now. It was when I started to listen and discover music via soundcloud and while shuffling through random playlists, I discovered this Japanese gem. 

 Botanical House sent this via air mail, it arrived so soon after I received the notification mail from them. It's so unfortunate that I couldn't test the vinyl right now, because I just sold my turntable to my colleague who was willing to buy it.




 The sleeve is same as the original album artwork. I didn't take the photo of it, but there was a small postcard with a photo of themselves wrapped in a brown envelope with the stamp of Botanical House outside the sleeve, and I guess it's a kind of a gift. 




  Inside the sleeve, insert with lyrics and a photo of Lamp on it was there and the vinyl seemed great. There's nothing better than a freshly pressed vinyl :)

2016년 10월 3일 월요일

Generators and the Lie Algebra of SO(3) - #2 Generators



 We derived the representation of SO(3) on the last post, 'Generators and the Lie Algebra of SO(3) - #1 Representation', which shown up to be the below three matrices. 

\[ R_{x}(\psi)=\begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\phi & \sin\phi \\ 0 & -\sin\phi & \cos\phi \end{pmatrix} \quad R_{y}(\phi)=\begin{pmatrix} \cos\phi & 0 & -\sin\phi \\ 0 & 1  & 0 \\ \sin\phi & 0 & \cos\phi \end{pmatrix} \quad R_{z}(\theta)= \begin{pmatrix} \cos\theta & \sin\theta & 0 \\ -\sin\theta & \cos\theta & 0 \\ 0 & 0 & 1  \end{pmatrix} \]

And we know that multiplying all of them would represent any arbitrary element of SO(3), but we won't do that. Generators could be derived by differentiating each representations.

\[ \mathcal{R}_{x}=\frac{\partial}{\partial \psi}R_{x}(\psi)|_{\psi=0}\ \quad \textrm{,} \quad \mathcal{R}_{y}=\frac{\partial}{\partial \phi}R_{y}(\phi)|_{\phi=0} \quad \textrm{,} \quad\mathcal{R}_{z}=\frac{\partial}{\partial \theta}R_{z}(\theta)|_{\theta=0} \]

Thus we can obtain 3 generators, $\mathcal{R}_{x}$, , $\mathcal{R}_{y}$, and , $\mathcal{R}_{z}$.

\[ \mathcal{R}_{x} = \begin{pmatrix} 0&0&0\\ 0&0&1\\ 0&-1&0 \end{pmatrix} \]

\[ \mathcal{R}_{y} = \begin{pmatrix} 0&0&-1\\ 0&0&0\\ 1&0&0 \end{pmatrix} \]

\[ \mathcal{R}_{z} = \begin{pmatrix} 0&1&0\\ -1&0&0\\ 0&0&0 \end{pmatrix} \]

We can check if these generators generate each rotations by using the exponential function. And we can check the below equations, which tells us they do generate the rotations.

\[ R_{x}(\psi)=e^{\psi\mathcal{R}_{x}} \quad \textrm{,} \quad R_{y}(\phi)=e^{\phi\mathcal{R}_{y}}\quad \textrm{,} \quad R_{z}(\theta)=e^{\theta\mathcal{R}_{z}}  \]

Defining new matrices by multiplying $-i$ on each generators, we can find about commutation relations. Thus, we define new a new matrix as

\[ J_{x} \equiv -i\mathcal{R}_{x} = \begin{pmatrix} 0&0&0\\ 0&0&-i\\ 0&i&0 \end{pmatrix} \]

\[ J_{y}  \equiv -i\mathcal{R}_{y} = \begin{pmatrix} 0&0&i\\ 0&0&0\\ -i&0&0 \end{pmatrix} \]

\[ J_{z} \equiv -i\mathcal{R}_{z}= \begin{pmatrix} 0&-i&0\\ i&0&0\\ 0&0&0 \end{pmatrix} \]

Commutating each of the $J$s would show us the commutation relations.

\[ \left[ J_x , J_y \right] = \begin{pmatrix} 0&0&0\\ 0&0&-i\\ 0&i&0 \end{pmatrix}\begin{pmatrix} 0&0&i\\ 0&0&0\\ -i&0&0 \end{pmatrix} - \begin{pmatrix} 0&0&i\\ 0&0&0\\ -i&0&0 \end{pmatrix} \begin{pmatrix} 0&0&0\\ 0&0&-i\\ 0&i&0 \end{pmatrix}\]

\[ \left[ J_x , J_y \right] = \begin{pmatrix} 0&0&0\\ -1&0&0\\ 0&0&0 \end{pmatrix} - \begin{pmatrix} 0&-1&0\\ 0&0&0\\ 0&0&0 \end{pmatrix} = \begin{pmatrix} 0&1&0\\ -1&0&0\\ 0&0&0 \end{pmatrix}\]

Thus,

\[ \left[ J_x , J_y \right] = \begin{pmatrix} 0&1&0\\ -1&0&0\\ 0&0&0 \end{pmatrix}= i J_z \]

Doing this for every $J$s, we can obtain below equations.

\[ \left[ J_x , J_y \right]= i J_z \quad , \quad \left[ J_y , J_z \right]= i J_x \quad , \quad \left[ J_z , J_x \right]= i J_y \]

\[ \left[ J_y , J_x \right]= - i J_z \quad , \quad \left[ J_z , J_y \right]= - i J_x \quad , \quad \left[ J_x , J_z \right]= - i J_y \]

And it is trivial that commutation between the same $J$ would be 0, which means that $\left[ J_i , J_i \right]=  0 $. Obtaining every commutation relation, the structure constant of SO(3) can be easily expressed by using the Levi-Civita symbol.

\[ \left[ J_i , J_j \right]= i \epsilon_{ijk} J_k \]

Thus, the structure constant of SO(3) is $\epsilon_{ijk}$, and the Lie algebra is $\left[ J_i , J_j \right]= i \epsilon_{ijk} J_k $.

Generators and the Lie Algebra of SO(3) - #1 Representation



 SO(3) group is the Special Orthogonal group of 3-dimension, and we can easily understand it's property by using rotations of 3-dimension. There are many ways to represent an arbitrary rotation in $R^3$. If you ever had a Classic Mechanics or Analytical Mechanics lecture, you may have learned the 'Euler Angle' representation for rotations. Rather using the Euler angle representation, I'll introduce a slightly different but very similar representation which leads SO(3) to have 3 parameters for any arbitrary rotation. The basic notion of Euler angle is to rotate 3 times, and each rotation has an invariant axis. Thus, there are lots of Euler angles, for example, we can rotate by $(z,x,z)$, which means that the first rotation is based on the z-axis, the second rotation is based  on the rotated y-axis, and the last rotation is based on the z-axis. The type of Euler angle is differed by people or book, we can just use what is convenient to us. 


 Euler angles are great to represent random rotations, but it makes us hard to derive the generators of SO(3). Thus we need a different representation, which is very similar to the Euler method. Not every axis rotation is involved in 'Euler angles', which means that $(x,y,z)$, $(y,z,x)$, $(z,x,y)$, $(z,y,x)$, $(y,x,z)$, $(x,z,y)$ are included. Then what about the representation that is consisted with every three base rotations..........? They are called 'Tait-Bryan angles', which includes $(x,y,z)$, $(y,z,x)$, $(z,x,y)$, $(z,y,x)$, $(y,x,z)$, $(x,z,y)$. ( Some people call them both 'Euler angles' and call $(x,y,x)$, $(y,x,y)$, $(z,x,z)$, $(x,z,x)$, $(y,z,y)$, $(z,y,z)$ as 'Proper Euler angles'. We'll just call them Euler angles & Tait-Bryan angles.  )


 So, using Tait-Bryan angle representation, we could represent any element of SO(3) with 3 parameters. The rotation based on the $x$ axis with the angle of $\psi$, $y$ axis with the angle of $\phi$, and the $z$ axis with $\theta$ could be represented by a $3\times 3$ matrix, and multiplying every matrix would represent the whole rotation. Using mathematical language, we can write

\[ R_{x_{i}}(\theta_{i}) |x_{i}\rangle = |x_{i}\rangle \quad \textrm{when} \quad |x_{i}\rangle = \begin{pmatrix} \delta_{i1}x_1 \\ \vdots \\ \delta_{ii}x_i \\ \vdots  \end{pmatrix} = \begin{pmatrix} \vdots \\ x_i \\ \vdots \end{pmatrix}=x_{i}|e_{i}\rangle \]

which tells us that $x_i$based rotation doesn't affects $x_i$ rotation. And, the total representation would look like, 

\[ R(\theta,\psi,\phi)=R_{x}(\psi)R_{y}(\phi)R_{z}(\theta) \quad \textrm{and} \quad R(\theta,\psi,\phi) \in SO(3) \]

when we rotate with the sequence of $z$ , $y$, and then $x$. 

 Now, lets take a closer look on each rotations. 

 First, the rotation of $z$ axis $R_{z}(\theta)$, is the rotation which rotates $\theta$ in counter-clockwise and leaves the $z$ axis invariant, and transforms the $x$ and $y$ as $R_{z}(\theta)|x\rangle$ and $R_{z}(\theta)|y\rangle$ .  Refer to the below figure for better understanding. 




 Thus, we can derive the representation of $R_{z}(\theta)$ by comparing how the axis changed. 

\[R_{z}(\theta)|x\rangle=\begin{pmatrix} x\cos\theta \\ -x\sin\theta \\ 0 \end{pmatrix}\ \quad R_{z}(\theta)|y\rangle=\begin{pmatrix} y\sin\theta \\ y\cos\theta \\ 0 \end{pmatrix}\ \quad R_{z}(\theta)|z\rangle=\begin{pmatrix} 0 \\ 0 \\ z \end{pmatrix} \]

Which tells us that,

\[ R_{z}(\theta)|x\rangle + R_{z}(\theta)|y\rangle + R_{z}(\theta)|z\rangle =R_{z}(\theta) \begin{pmatrix} x \\ y \\ z \end{pmatrix} = \begin{pmatrix} x\cos\theta+y\sin\theta \\ -x\sin\theta+y\cos\theta \\ z \end{pmatrix}   \]

So we can assume $R_{z}(\theta)$ is,

\[ R_{z}(\theta)= \begin{pmatrix} \cos\theta & \sin\theta & 0 \\ -\sin\theta & \cos\theta & 0 \\ 0 & 0 & 1  \end{pmatrix}\]


 Things are same on different axes. 




 $y$ axis rotation in the same fashion : 

\[ R_{y}(\phi)|x\rangle=\begin{pmatrix} x\cos\phi \\ 0 \\ x\sin\phi \end{pmatrix}\ \quad R_{y}(\phi)|y\rangle=\begin{pmatrix} 0 \\ y \\ 0 \end{pmatrix}\ \quad R_{y}(\phi)|z\rangle=\begin{pmatrix} -z\sin\phi \\ 0 \\ z\cos\phi \end{pmatrix}\]

\[ R_{y}(\phi)|x\rangle + R_{y}(\phi)|y\rangle + R_{y}(\phi)|z\rangle = R_{y}(\phi) \begin{pmatrix} x \\ y \\ z \end{pmatrix}\ = \begin{pmatrix} x\cos\phi-z\sin\phi \\ y \\ x\sin\phi+z\cos\phi  \end{pmatrix} \]

Thus we can assume $R_{y}(\phi)$ as, 

\[ R_{y}(\phi)=\begin{pmatrix} \cos\phi & 0 & -\sin\phi \\ 0 & 1  & 0 \\ \sin\phi & 0 & \cos\phi \end{pmatrix} \]


 And the last rotation, $R_{x}(\psi)$, which leaved the $x$ axis invariant is derived as same as the others. 




Using mathematical notation,

\[  R_{x}(\psi)|x\rangle=\begin{pmatrix} x \\ 0 \\ 0 \end{pmatrix} \quad  R_{x}(\psi)|y\rangle=\begin{pmatrix} 0 \\ y\cos\phi \\ -y\sin\phi \end{pmatrix} \quad  R_{x}(\psi)|z\rangle=\begin{pmatrix} 0 \\ z\sin\phi \\ z\cos\phi \end{pmatrix} \]

\[ R_{x}(\psi)|x\rangle+R_{x}(\psi)|y\rangle+R_{x}(\psi)|z\rangle=R_{x}(\psi)\begin{pmatrix} x \\ y \\ z \end{pmatrix}=\begin{pmatrix} x \\   y\cos\phi+ z\sin\phi \\  -y\sin\phi+   z\cos\phi \end{pmatrix} \]

Thus, we can finally get the representation of our last rotation :

\[ R_{x}(\psi)=\begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\phi & \sin\phi \\ 0 & -\sin\phi & \cos\phi \end{pmatrix} \]

Deriving each representations,

\[ R_{x}(\psi)=\begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\phi & \sin\phi \\ 0 & -\sin\phi & \cos\phi \end{pmatrix} \quad R_{y}(\phi)=\begin{pmatrix} \cos\phi & 0 & -\sin\phi \\ 0 & 1  & 0 \\ \sin\phi & 0 & \cos\phi \end{pmatrix} \quad R_{z}(\theta)= \begin{pmatrix} \cos\theta & \sin\theta & 0 \\ -\sin\theta & \cos\theta & 0 \\ 0 & 0 & 1  \end{pmatrix} \]

and multiplying all of them would be our final representation of SO(3), the $R(\theta,\psi,\phi)$.

 But, for deriving the generators, we don't need to use $R(\theta,\psi,\phi)$,( and it also looks boring to multiply 3 $3 \times 3 $ matrices) but we need to think of each of it's rotations individually. It'll be discussed on later posts.


2016년 10월 2일 일요일

LaTeX compatible graphics with Asymptote




 I wanted to make some graphics for some posts, especially while I was writing about SO(3) generators and it's Lie Algebra, so I googled some graphic tools compatible with $\LaTeX$ and I discovered Asymptote.  It produces high quality SVG, PDF, etc which is also compatible with $\LaTeX$, and it's great than I thought at my first sight.




 I struggled a lot for the first time realizing how to compile, or using the right syntax because it wasn't actually 'easy' to use, so I googled some wikis and tutorials. Playing with some codes and tutorials, now I think it's way better. Below is the code for a graphic that will be used in my later posts, showing the rotation which the z-axis is invariant.



1:  settings.outformat = "png" ;  
2:  settings.render = 32 ;  
3:  import three;  
4:    
5:  size(4cm);  
6:  currentprojection=perspective(1,1,0.7,up=Z);  
7:    
8:  //regular axis  
9:  draw( O -- X, L=Label("$x$", position = EndPoint) ,  
10:     arrow=Arrow3(emissive(black)));  
11: draw( O -- Y, L=Label("$y$", position = EndPoint) ,  
12:     arrow=Arrow3(emissive(black)));  
13: draw( O -- Z, L=Label("$z$", position = EndPoint) ,  
14:     arrow=Arrow3(emissive(black)));  
15:    
16:    
17:  //transformed axis  
18:  draw( O -- cos(0.3)*X+sin(0.3)*Y,  
19:     L = Label( scale(0.3) * "$R_{z}(\theta)|x\rangle$",  
20:           position = EndPoint) ,   
21:     arrow=Arrow3(emissive(red)),   
22:     red);  
23:    
24:  draw( O -- cos(0.3)*Y-sin(0.3)*X,  
25:     L = Label( scale(0.3) * "$R_{z}(\theta)|y\rangle$",  
26:         position = EndPoint) ,  
27:     arrow=Arrow3(emissive(red)),red);  
28:    
29:    
30:  //angle representation  
31:  draw( arc(c=O, 0.2*X, 0.2*cos(0.3)*X+0.2*sin(0.3)*Y),   
32:     red+linewidth(0.3pt) );  
33:  draw( arc(c=O, 0.2*Y, 0.2*cos(0.3)*Y-0.2*sin(0.3)*X),   
34:     red+linewidth(0.3pt) );  
35:    
36:  dot(O);  


  The result was the below one.


  

  The best thing about Asymptote is that it is greatly compatible with $\LaTeX$. Using the command usepackage in $\LaTeX$ will make it available to use Asymptote in it, so that we can draw graphics while writing the words. And as Asymptote uses TeX fonts, there is font consistency when it's used with $\LaTeX$. 

 I'm still not so familiar and there's tons of things to learn more about it's functions and syntax, but it will be a great merit when I need to plot or design graphics while using $\LaTeX$. I hope you guys would find it useful too.


2016년 10월 1일 토요일

October random thoughts






Time flies for sure, it's already October. I think I did nothing this year, no... I surely did things, a bunch and loads of things but realizing the instant pass of time, it feels kinda empty and as if I did nothing. This semester feels rather loose than the last one, so I really have lots of time... tons of time ( to study )

 Starting from this summer vacation, I mainly studied Group Theory, focusing on parts used and applied in Physics, and that's the reason why my posts are mainly about group theory. I was studying the 6th edition of "Mathematical Methods for Physicists" (Arfken), and stuck on the group theory part. It was a dumb thing to use it as my main book to study mathematical physics because it's like an encyclopedia for reference. ( but it actually helped me revise some vector analysis ) I guess that was how I started studying group theory... While studying group theory, I realized lots of things and gained better perspective understanding various physical phenomena. 

 Midterm exam is about 2 weeks left and I haven't studied any German. German was easy than I thought 2 weeks ago.