TITLE: Maxima vector magnitude and cross product
QUESTION [7 upvotes]: I'm new to maxima. And I have two questions:
1. Question
I have a little problem with computing vector's magnitude. Now I'm using such form as 
sqrt(v1.v1)

This code looks very ugly.
2. Question
I thought vector cross product is expressed like a~b. but Maxima says ~ is not an infix operator

REPLY [2 votes]: If you don't mind using lists as vectors a very simple solution would be functions::
cross(u, v) := [u[2] * v[3] - v[2] * u[3], v[1] * u[3] - u[1] * v[3], u[1] * v[2] - v[1] * u[2]]$
dot(u, v) := u[1] * v[1] + u[2] * v[2] + u[3] * v[3]$
norm(u) := sqrt(dot(u, u))$

this is not an ideal nor safe solution but a concise one.