Re: Norm, Normalize and column vectors

• To: mathgroup at smc.vnet.net
• Subject: [mg126397] Re: Norm, Normalize and column vectors
• From: Bill Rowe <readnews at sbcglobal.net>
• Date: Sun, 6 May 2012 20:30:59 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com

```On 5/6/12 at 3:24 AM, brenttnewman at gmail.com (Brentt) wrote:

>Why does Norm work with column vectors, but Normalize does not?

>e.g.. In[1]:= Norm[{{1}, {2}, {3}}]

>Out[1]= Sqrt[14]

>But

>In[2]:=Normalize[{{1}, {2}, {3}}]

>Throws red

>It even says in the documentation that Normalize[v] essentially
>returns

>Times[Power[Norm[v],-1],v],   except returning the 0 vector for the
>0 vector. Strangely, the above "equivalent" expression would handle
>all but th 0 column vector with aplomb.

>I find this curious. Is there a good explanation for this?

Mathematica has no concept of row/column vectors. A vector in
Mathematica is a 1-d list. That is:

In[1]:= a = Range[3];
{VectorQ[a], MatrixQ[a]}

Out[2]= {True,False}

In[3]:= {VectorQ[{a}], MatrixQ[{a}]}

Out[3]= {False,True}

In[4]:= {VectorQ[List /@ a], MatrixQ[List /@ a]}

Out[4]= {False,True}

The documentation specifically states Normalize works with
vectors, not matrices. Norm works with matrices. What you a
row/column vector is a matrix in Mathematica.

```

• Prev by Date: Re: New to Mathematica
• Next by Date: Re: Norm, Normalize and column vectors
• Previous by thread: Re: Norm, Normalize and column vectors
• Next by thread: KeyUp event