% ma211 hw 3.1 # 5,7,T4,T5

% number 5 and 7

A = [3 0;-1 2; 1 1]
B = [2 1;-3 1;4 0]
C = [1 0; 3 -1]
D = [1 1; -3 3]
E = [1 4 2; 3 1 5]
F = [1 5 2; -1 0 1; 3 2 4]
G = [6 1 3; -1 1 2; 4 1 3]

% number 5
aa = A+2*B
%bb = A-B' % impossible
cc = 4*D-3*C' 
dd = D-D' 
ee = G+(2*F)'
% ff = (7*A-B)+E % impossible

% number 7
aa = C*D
bb = A*E
cc = F*G
%dd = B'*F % impossible
ee = B*B'
% ff = G*E % impossible

% T4
A = [3 1 -7; 2 4 11; 3 3 9]

row1 = A(1,:)
row2 = A(2,:)
row3 = A(3,:)
col1 = A(:,1)
col2 = A(:,2)
col2 = A(:,2)

rowsum = sum(A,1)
colsum = sum(A,2)

d = diag(A)

% T5

ff = G*E % impossible
