Hey there.

So I’m very new to coding with Julia and am trying to get a handle on the “generalizability” of the language, as I’ll call it.

Below I created a Point strcut/class/? and defined the + and * operations of two points. I want to figure out how to take this and make the last line work somewhat like regular matrix multiplication works. Just instead of scalars the entries of the resulting matrix would be Point’s. Could someone point me in the direction to look to do this?

```
import Base.+
import Base.*
struct Point
x::Number
y::Number
end
+(p1::Point, p2::Point) = Point(p1.x + p2.x, p1.y + p2.y)
*(p1::Point, p2::Point) = Point(p1.x * p2.x, p1.y * p2.y)
a = Point(1,1)
b = Point(2,2)
c = a + b
point_matrix = [Point(i, j) for i in 1:3, j in 4:6]
point_matrix
point_vector = [a; b; c]
point_vector
point_matrix * point_vector
```

Below is the error that is generated

MethodError: no method matching zero(::Point)

Closest candidates are:

zero(!Matched::Type{LibGit2.GitHash}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LibGit2/src/oid.jl:220

zero(!Matched::Type{Pkg.Resolve.VersionWeights.VersionWeight}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/resolve/VersionWeights.jl:19

zero(!Matched::Type{Pkg.Resolve.MaxSum.FieldValues.FieldValue}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Pkg/src/resolve/FieldValues.jl:44

…

Stacktrace:

[1] generic_matvecmul!(::Array{Point,1}, ::Char, ::Array{Point,2}, ::Array{Point,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl:542

[2] mul! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl:76 [inlined]

[3] *(::Array{Point,2}, ::Array{Point,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl:50

[4] top-level scope at In[12]:1

Also, if anyone could give me formatting tips or a link to a guide on how to make a better post that would be great!