This notebooks shows how to work with vectors in R
Given are the following two vectors v and w. Compute
- the sum v+w,
- the difference v−w and
- the dot product v⋅w.
v=[3−519]
and
w=[19−1227]
LS0tCnRpdGxlOiAiVmVjdG9ycyBpbiBSIgpvdXRwdXQ6IGh0bWxfbm90ZWJvb2sKLS0tCgpUaGlzIG5vdGVib29rcyBzaG93cyBob3cgdG8gd29yayB3aXRoIHZlY3RvcnMgaW4gUgoKR2l2ZW4gYXJlIHRoZSBmb2xsb3dpbmcgdHdvIHZlY3RvcnMgJHYkIGFuZCAkdyQuIENvbXB1dGUKCiogdGhlIHN1bSAkdit3JCwgCiogdGhlIGRpZmZlcmVuY2UgJHYtdyQgYW5kIAoqIHRoZSBkb3QgcHJvZHVjdCAkdlxjZG90IHckLiAKCiQkdiA9IFxsZWZ0W1xiZWdpbnthcnJheX17Y30KICAgMyAgXFwgCiAgLTUgIFxcIAogICAxICBcXCAKICAgOSAgXFwKICBcZW5ke2FycmF5fVxyaWdodF0KJCQKCmFuZCAKCiQkdyA9IFxsZWZ0W1xiZWdpbnthcnJheX17Y30KICAgIDEgIFxcIAogICAgOSAgXFwgCiAgLTEyICBcXCAKICAgMjcgIFxcCiAgXGVuZHthcnJheX1ccmlnaHRdCiQkCg==