clc;
close all;
clear all;
A=[-2 1 0;1 -2 1;0 1 -2];
%%%%%%%%%%%%%%question 1%%%%%%%%%%%%%
fprintf('determinant of A=%f\n',det(A));
fprintf('inverse of A=\n');
%%%%%%%%%%%%%%question 2%%%%%%%%%%%%%
fprintf('inverse of A inverse\n');
A=inv(A)
fprintf('original A\n')
A=inv(A)
%%%%%%%%%%%%%%question 3%%%%%%%%%%%%%
fprintf('random matrix A\n');
A=round(40*(rand(5)-0.5))
fprintf('random matrix B\n');
B=round(40*(rand(5)-0.5))
det(A)
det(B)
det(3*A)
3*det(A)
3^3*det(A)
det(A')
det(B')
det(A+B)
det(A)+det(B)
det(A*B)
det(B*A)
det(A'*B')
det(B'*A')
det(inv(A))
1/det(A)
det(inv(A)*B)
det(A)/det(B)
det(B)/det(A)
det(inv(B)*A*B)
det(inv(B)*B)
det(2*inv(B)*B)
just copy this code and paste into a new script and run
you will get all values of table mention above serially on command window of
matlab.
Exercice 2. Let A given by -(iii) 21 A 1 -2 01 -2 1. Compate det(...