# Do people ever multiply by the 1 vector for summation?

**URL:** <https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498>\
**Category:** Factual Questions\
**Created:** [October 6, 2014, 12:32am UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498 "2014-10-06T00:32:57Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [October 6, 2014, 12:32am UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/1 "2014-10-06T00:32:57Z")

</div>

I’ve been doing some math with a lot of vectors, and it occurs to me that in some cases it just looks notationally cleaner to use

y= **v** [sup]T[/sup] **1**

Instead of

y=Σ[sub]i=1-\>n[/sub]v[sub]i[/sub]

Is this commonly used in any fields of math? I’d only do it in my own notes, not anything anyone else is going to see, since I’ve never seen it before. I was just wondering if this is ever used.

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [October 6, 2014, 12:50am UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/2 "2014-10-06T00:50:29Z")

</div>

I use that notation all the time in my class notes for students though I use ’ rather than a superscript T for transpose.

---

<div class="post-metadata">

**Author:** ![MikeS](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@MikeS](https://boards.straightdope.com/u/MikeS)\
**Post date:** [October 6, 2014, 12:52am UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/3 "2014-10-06T00:52:22Z")

</div>

You could do that, yes, but I’ve never seen it done. My guess is that it’s not common because the **1** vector (I’m assuming by this you mean a vector containing all 1’s) isn’t basis-independent, and that property matters for some (but by no means all) applications.

---

<div class="post-metadata">

**Author:** ![Pasta](https://avatars.discourse-cdn.com/v4/letter/p/ecccb3/32.png) [@Pasta](https://boards.straightdope.com/u/Pasta)\
**Post date:** [October 6, 2014, 3:21am UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/4 "2014-10-06T03:21:54Z")

</div>

If I wanted compact notation, I’d just leave the index and range implicit:

y=Σv[sub]i[/sub]

I don’t recall seeing your **1** notation in the wild.

---

<div class="post-metadata">

**Author:** ![Asympotically\_fat](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Asympotically\_fat](https://boards.straightdope.com/u/Asympotically_fat)\
**Post date:** [October 6, 2014, 4:31am UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/5 "2014-10-06T04:31:33Z")

</div>

> [@Jragon](#):
>
> I’ve been doing some math with a lot of vectors, and it occurs to me that in some cases it just looks notationally cleaner to use
> 
> y= **v** [sup]T[/sup] **1**
> 
> Instead of
> 
> y=Σ[sub]i=1-\>n[/sub]v[sub]i[/sub]
> 
> Is this commonly used in any fields of math? I’d only do it in my own notes, not anything anyone else is going to see, since I’ve never seen it before. I was just wondering if this is ever used.

[It seems it is used](http://books.google.co.uk/books?id=PDjIV0iWa2cC&pg=PA23&lpg=PA23&dq=%22the+one+vector%22&source=bl&ots=kj1aECQTt2&sig=r0B6jcLwU3-5ZFJHJxnFFq2nYEQ&hl=en&sa=X&ei=Ue4xVNbmNoraatj9gMAI&ved=0CCEQ6AEwAA#v=onepage&q=%22the%20one%20vector%22&f=false)

But it also seems to open the door to confusion. The first equation appears to be a dot product and should be invariant under a change of basis, whereas the second equation clearly is not invariant. The reason for the discrepancy of course being that which vector you use as **1** depends on the basis.

---

<div class="post-metadata">

**Author:** ![Half\_Man\_Half\_Wit](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/half_man_half_wit/32/21766_2.png) [@Half\_Man\_Half\_Wit](https://boards.straightdope.com/u/Half_Man_Half_Wit)\
**Post date:** [October 6, 2014, 6:11pm UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/6 "2014-10-06T18:11:31Z")

</div>

The “one vector” to sum them all?

Me, I haven’t seen it previously, and would probably be confused for a moment if I encountered it without warning.

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [October 6, 2014, 6:39pm UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/7 "2014-10-06T18:39:43Z")

</div>

> [@Half\_Man\_Half\_Wit](#):
>
> The “one vector” to sum them all?
> 
> Me, I haven’t seen it previously, and would probably be confused for a moment if I encountered it without warning.

Same here.

The zero vector **0** is so-called, not just because it contains all zeros, but because it acts as a zero—that is, the additive identity element. By analogy, the “one vector” **1** should be the multiplicative identity—except, what would that be? What kind of multiplication are we talking about?

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [October 6, 2014, 7:32pm UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/8 "2014-10-06T19:32:52Z")

</div>

> [@Thudlow\_Boink](#):
>
> By analogy, the “one vector” **1** should be the multiplicative identity—except, what would that be? What kind of multiplication are we talking about?

1 would be an identity scalar with 1 **x** = **x**. For matrix multiplication, the identity is, of course, **I** , a square matrix with 1’s on the diagonal and 0’s elsewhere.

This is the type of situation in which I use the **1** vector. Let **x** be a vector of random variables with variance-covariance matrix **V**. Then the weighted average of the x’s with the minimum variance is the solution to

min[sub] **x** [/sub] **w** ’ **Vw** subject to **1** ’ **w** = 1.

The solution is **w** = **V** [sup]-1[/sup] **1** / **1** ’ **V** [sup]-1[/sup] **1**.

You can do this with summation notation, but this is much clearer to those who know vectors. In particular, the expression Σ[sub]j[/sub]V[sub]ij[/sub][sup]-1[/sup] consistently confuses some students as to whether it means Σ[sub]j/sub[sup]-1[/sup] or Σ[sub]j/sub[sub]ij[/sub]

---

<div class="post-metadata">

**Author:** ![leahcim](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@leahcim](https://boards.straightdope.com/u/leahcim)\
**Post date:** [October 6, 2014, 8:45pm UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/9 "2014-10-06T20:45:41Z")

</div>

I’ve seen it used productively in the context of deriving the normal equations for least squares. If you are positing a model of the form

y = a\*x + b

for some unknown scalars a and b, and you have samples of the form (x[sub]i[/sub], y[sub]i[/sub]) with i ranging from 1 to n, you can pack you samples into vectors in **R** [sup]n[/sup], and then all possible values of your model form a two-dimensional subspace of **R** [sup]n[/sup] with basis vectors **x** and **1**.

Your error is then:

**e** (a,b) = **y** - (a_ **x** + b_ **1** )

Which is then optimized when **e** (a,b) is normal to the plane defined by **x** and **1**.

I’ve seen **1** used on a few other occasions, but this is the only one I recall where it really clarifies the proof.

---

<div class="post-metadata">

**Author:** ![Jragon](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@Jragon](https://boards.straightdope.com/u/Jragon)\
**Post date:** [October 6, 2014, 10:01pm UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/10 "2014-10-06T22:01:19Z")

</div>

> [@leahcim](#):
>
> I’ve seen it used productively in the context of deriving the normal equations for least squares.

This is, in fact, the exact situation. (Well, a slightly modified derivation of least squares to take into account some other noise, but still)

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [October 7, 2014, 1:52am UTC](https://boards.straightdope.com/t/do-people-ever-multiply-by-the-1-vector-for-summation/700498/11 "2014-10-07T01:52:04Z")

</div>

> [@Pasta](#):
>
> If I wanted compact notation, I’d just leave the index and range implicit:
> 
> y=Σv[sub]i[/sub]

This abbreviated notation is quite commonly used in statistics.

ETA: Even more abbreviated: It would commonly be written simply as

Σv

where it is understood that v is a vector (actually, just a list of data points) to be summed.
