Hello Fil,

Generally, division is like multiplying by the inverse of the divisor.  For
vectors, the inverse is actually a pseudoinverse or generalized
inverse<http://en.wikipedia.org/wiki/Generalized_inverse>.
 In this case,

a / b = a * pinv(b)

where

julia> pinv(b)
1x3 Array{Float64,2}:
 0.0519481  0.0649351  0.0779221

julia> pinv(b) * b
1-element Array{Float64,1}:
 1.0

julia> a * pinv(b)  # the outer product of a and pinv(b)
3x3 Array{Float64,2}:
 0.0519481  0.0649351  0.0779221
 0.103896   0.12987    0.155844
 0.155844   0.194805   0.233766

Cheers!
   Kevin


On Tue, Feb 4, 2014 at 9:19 PM, Fil Mackay <[email protected]>wrote:

> Can anyone explain what's going on here? :)
>
> julia> a = [1,2,3]
> 3-element Array{Int64,1}:
>  1
>  2
>  3
>
> julia> b = [4,5,6]
> 3-element Array{Int64,1}:
>  4
>  5
>  6
>
> julia> a / b
> 3x3 Array{Float64,2}:
>  0.0519481  0.0649351  0.0779221
>  0.103896   0.12987    0.155844
>  0.155844   0.194805   0.233766
>
> I get the principle of how two vectors (3x) lead to a matrix (3x3) result
> - but the actual values are a mystery?
>
>

Reply via email to