How to plot graph y=1/x or y=x^2

I am using Octave but I think it applies to MatLab too, so I'm tagging this MatLab since there isnt a Octave tag

When I do

x=linspace(-5,5,25)
y=1/x


I get

error: operator /: nonconformant arguments (op1 is 1x1, op2 is 1x25)

Or

x=linspace(-5,5,25)
y=x^2


I get

error: for A^b, A must be square

How can I then plot the graphs of each?

-

x=linspace(-5,5,25)