Linear algebra
Linear algebra
In addition to (and as part of) its support for multi-dimensional arrays, Julia provides native implementations of many common and useful linear algebra operations. Basic operations, such as trace
, det
, and inv
are all supported:
julia> A = [1 2 3; 4 1 6; 7 8 1] 3×3 Array{Int64,2}: 1 2 3 4 1 6 7 8 1 julia> trace(A) 3 julia> det(A) 104.0 julia> inv(A) 3×3 Array{Float64,2}: -0.451923 0.211538 0.0865385 0.365385 -0.192308 0.0576923 0.240385 0.0576923 -0.0673077
As well as other useful operations, such as finding eigenvalues or eigenvectors:
julia> A = [1.5 2 -4; 3 -1 -6; -10 2.3 4] 3×3 Array{Float64,2}: 1.5 2.0 -4.0