#### <font,color="blue">The notations for matrix algebra in Julia are beautiful. The transpose of a matrix is just</font>¶

In [16]:
X=[1 2;3 4]

Out[16]:
2x2 Array{Int64,2}:
1  2
3  4
In [2]:
X'

Out[2]:
2x2 Array{Int64,2}:
1  3
2  4

#### <font,color="blue">Lots of linear algebra functions are avalable.</font>¶

In [3]:
X'X

Out[3]:
2x2 Array{Int64,2}:
10  14
14  20
In [17]:
kron(X,X)

Out[17]:
4x4 Array{Int64,2}:
1   2   2   4
3   4   6   8
3   6   4   8
9  12  12  16
In [20]:
y=[3,10]
X'X\X'y  #solve X'Xβ=X'y

Out[20]:
2-element Array{Float64,1}:
4.0
-0.5

#### <font,color="blue">It's easy to check the rank of a matrix, whether it is positive definite, trace, determinant ...</font>¶

In [4]:
rank(X)

Out[4]:
2
In [6]:
isposdef(X'X)

Out[6]:
true

Matrix decompositions

In [9]:
eig(X'X)

Out[9]:
([0.133931,29.8661],
2x2 Array{Float64,2}:
-0.817416  0.576048
0.576048  0.817416)
In [12]:
chol(X'X)

Out[12]:
2x2 Array{Float64,2}:
3.16228  4.42719
0.0      0.632456

Linear algebra functions in Julia are mostly implemented by calling LAPACK. Please check the official documentation to learn more.

#### reference¶

official documentation 1

official documentation 2