LINEAR ALGEBRA I will greatly appreciate it if you could provide me the \"MATLAB
ID: 3184434 • Letter: L
Question
LINEAR ALGEBRA
I will greatly appreciate it if you could provide me the "MATLAB CODES". Please do not try to solve it by handwriting. all i need is the matlab codes :)
Also, the ones in *mark does not require the codes; it indicates the answer should be typed into the output as a comment – the question isn’t asking for MATLAB output.
I'll make sure to give you thumbs up within 2 hrs! thanks so much for your time and help!
PLEASE DO Part a,b,c,d, ONLY!
2, Let A=12 0 1-2-1 (a) Enter A into MATLAB and use MATLAB to compute the dot product of the first column of A with its second column. Also compute the dot product of the third column with itself. (See guide for how to extract a column from a matrix.) (b) Compute the matrix product AT A (c) What is the relationship between the entries of AT A and the dot products of the columns of A? Make sure your answer is consistent with your computations (d) * What in general is the relationship between the entries of AA" and dot products of vectors associated to A? (e) Compute AA" and do at least two dot product computations to support your previous answer 3/V11 -1/V6 -1/V66 (f) Let Q = | 1/V11 2/V6-4/V66. Do a single matrix computation which shows that the columns of form an orthonormal set (g) Explain carefully why your computation above shows that the columns form an orthonormal (h) * Explain why the rows of Q must also form an orthonormal set setExplanation / Answer
%%% Matlab code %%%
clc;
clear all;
close all;
format short;
format compact;
%%%(a)
A=[1 2 0;0 3 3 ;2 0 5 ;-1 -2 -1];
d1=sum(A(:,1).*A(:,2));
d2=sum(A(:,3).*A(:,3));
fprintf(' Dot product of 1st column with 2nd column = %d ',d1);
fprintf(' Dot product of 3ed column with itself = %d ',d2);
%%% (b)
ans1=A'*A;
disp(' A'' A : ');
ans1
%%% (c)
%%% dot product of column
for i=1:3
for j=1:3
ans2(i,j)=sum(A(:,i).*A(:,j));
end
end
disp('Dot product of column of Matrix A :')
ans2
disp('Comparing both answer We comes to know that');
disp(' A''A and dot product of column of A is same ');
%%% (d)
ans3=A*A'
for i=1:4
for j=1:4
ans4(i,j)=sum(A(i,:).*A(j,:))
end
end
disp(' AA'' : ')
ans4
disp('Comparing both answer We comes to know that');
disp(' AA'' and dot product of vector associated with A is same ');
OUTPUT:
Dot product of 1st column with 2nd column = 4
Dot product of 3ed column with itself = 35
A' A :
ans1 =
6 4 11
4 17 11
11 11 35
Dot product of column of Matrix A :
ans2 =
6 4 11
4 17 11
11 11 35
Comparing both answer We comes to know that
A'A and dot product of column of A is same
ans3 =
5 6 2 -5
6 18 15 -9
2 15 29 -7
-5 -9 -7 6
AA' :
ans4 =
5 6 2 -5
6 18 15 -9
2 15 29 -7
-5 -9 -7 6
Comparing both answer We comes to know that
AA' and dot product of vector associated with A is same
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.