clc
clear all
close all

% z = x1^2 + x2^2 - 4 x1 x2
X1 = -5:.1:5;
X2 = X1;
[x1, x2] = meshgrid(X1, X2);
z = x1.^2 + x2.^2 - 4*x1.*x2;
surf(x1, x2, z)

A = [1 -2; -2 1]
disp("The eigenvalues of the matrix A are:")
eig(A)

% Next exercise
A = [1 2 6 4; 0 2 1 0; 0 0 -1 1; 0 0 0 3]
disp("det A =")
det(A)