matrice1 operazioni con vettori


(* somma due vettori *)
v1={a,b,c,d}
v2={e,f,g,h}
sommare12=v1+v2
vettore1={1,2,3,4}
vettore2={5,6,7,8}
somma12=vettore1+vettore2

{a, b, c, d}
;[o]
{a, b, c, d}

{e, f, g, h}
;[o]
{e, f, g, h}

{a + e, b + f, c + g, d + h}
;[o]
{a + e, b + f, c + g, d + h}

{1, 2, 3, 4}
;[o]
{1, 2, 3, 4}

{5, 6, 7, 8}
;[o]
{5, 6, 7, 8}

{6, 8, 10, 12}
;[o]
{6, 8, 10, 12}

Plus[v1,v2]
Plus[vettore1,vettore2]

{a + e, b + f, c + g, d + h}
;[o]
{a + e, b + f, c + g, d + h}
{6, 8, 10, 12}
;[o]
{6, 8, 10, 12}

(* prodotto due vettori  *)
v1.v2
vettore1.vettore2

a*e + b*f + c*g + d*h
;[o]
a e + b f + c g + d h

70
;[o]
70
v1*v2
vettore1*vettore2
{a*e, b*f, c*g, d*h}
;[o]
{a e, b f, c g, d h}
{5, 12, 21, 32}
;[o]
{5, 12, 21, 32}
v1 v2
vettore1 vettore2
{a*e, b*f, c*g, d*h}
;[o]
{a e, b f, c g, d h}
{5, 12, 21, 32}
;[o]
{5, 12, 21, 32}
(* prodotto scalare vettore per costante *)
v1 k
v2 k
costante=10
costante vettore1 
vettore2 costante
{a*k, b*k, c*k, d*k}
;[o]
{a k, b k, c k, d k}
{e*k, f*k, g*k, h*k}
;[o]
{e k, f k, g k, h k}
10
;[o]
10
{10, 20, 30, 40}
;[o]
{10, 20, 30, 40}
{50, 60, 70, 80}
;[o]
{50, 60, 70, 80}
(* prodotto tre vettori *)
{1,2} {3,4} {5,6}
{15, 48}
;[o]
{15, 48}
vet1={1,2}
vet2={3,4}
vet3={5,6}
vet1 vet2 vet3
vet1.vet2.vet3
{1, 2}
;[o]
{1, 2}
{3, 4}
;[o]
{3, 4}
{5, 6}
;[o]
{5, 6}
{15, 48}
;[o]
{15, 48}
11 . {5, 6}
;[o]
11 . {5, 6}

ritorna a inizio