Length Of Vectors

Description

The euclidian length of a vector, or the norm of a vector, is

(1)
\begin{align} ||\mathbf x|| = \left( \sum_{i=1}^n x_i^2 \right)^2 \end{align}

The Sage cell below calculates the length of the vector $a = [ 1, 2, 3 ]$.

Sage Cell

Code

a=vector([ 1, 2, 3 ])
a.norm()

Options

None

Tags

Primary Tags:

Secondary Tags:

Related Cells

Attribute

Permalink:

Author:

Date: 06 Nov 2018 16:28

Submitted by: James A Phillips

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License