vec={1.0,2.0};
mat1={{3.0,0},{0,3}};
mat2={{1.0,-1},{-3,2}};

Print["mat1: ",mat1//MatrixForm]
Print["mat1: ",3*IdentityMatrix[2]//MatrixForm]
Print["mat2: ",mat2//MatrixForm]
Print["vec: ",vec//MatrixForm]
Print["vec: ",IdentityMatrix[2].vec//MatrixForm]

(* multiply *)
mat2*vec  (*does what? *)
Print["mat2.vec: ",mat2.vec//MatrixForm]
Print["mat1.mat2: ",mat1.mat2//MatrixForm]
(* order matters, but not with simple mat1! *)Print["mat2.mat1: ",mat2.mat1//MatrixForm]

mat3={{-1.0,0},{3,-3}};
Print["mat3: ",mat3//MatrixForm]Print["mat3.mat2: ",mat3.mat2//MatrixForm]
Print["mat2.mat3: ",mat2.mat3//MatrixForm]

mat2inv=Inverse[mat2];
Print["mat2inv: ",mat2inv//MatrixForm]
(* check *)
Print["mat2inv.mat2: ",mat2inv.mat2//MatrixForm]
Print["mat2.mat2inv: ",mat2.mat2inv//MatrixForm]
(*error since vec is not square matrix:*)
Inverse[vec]

(*linear system mat2.x=vec *)
x=Inverse[mat2].vec;
Print["x: ",x//MatrixForm]
Print["check: ",mat2.x//MatrixForm]
(*check:  *)

mat4={{1.0,4},{2,8}};
Print["mat4: ",mat4//MatrixForm]
Print["mat4inv: ",Inverse[mat4]//MatrixForm]