Matrix normalized, Matrix norm

9 views
Skip to first unread message

Massimo Biber

unread,
Jul 14, 2016, 10:07:53 AM7/14/16
to sympy
>>> from sympy import *
>>> v=symbols('v:3',real=True);v
(v0, v1, v2)
>>> V=Matrix(v);V
Matrix([
[v0],
[v1],
[v2]])
>>> U=V.normalized()
>>> U
Matrix([
[v0/sqrt(v0**2 + v1**2 + v2**2)],
[v1/sqrt(v0**2 + v1**2 + v2**2)],
[v2/sqrt(v0**2 + v1**2 + v2**2)]])
>>> U.norm()
sqrt(v0**2/(-v0**2 - v1**2 - v2**2) + v1**2/(-v0**2 - v1**2 - v2**2) + v2**2/(-v0**2 - v1**2 - v2**2))
>>> _.simplify()
I
>>> 

Why is U.norm() NOT equal 1?
Reply all
Reply to author
Forward
0 new messages