0% found this document useful (0 votes)
4 views6 pages

Assignment 04new

The document contains a series of mathematical computations involving matrices, including rank, nullity, eigenvalues, and eigenvectors. It also discusses diagonalization and Jordan decomposition of matrices, alongside determinants and row reduction techniques. Various matrix operations and their properties are explored through examples and calculations.

Uploaded by

rahimaparvin6923
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views6 pages

Assignment 04new

The document contains a series of mathematical computations involving matrices, including rank, nullity, eigenvalues, and eigenvectors. It also discusses diagonalization and Jordan decomposition of matrices, alongside determinants and row reduction techniques. Various matrix operations and their properties are explored through examples and calculations.

Uploaded by

rahimaparvin6923
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

I n [ ] : = (*01*)

A = {{1, 2, 3, 4}, {2, 4, 6, 8}, {1, 1, 1, 1}};

I n [ ] : = (*i*)
rank = MatrixRank[A]
O u t [ ] =

I n [ ] : = nullity = Dimensions[A]〚2〛 - rank


O u t [ ] =

(*ii*)

I n [ ] : = nullspace = NullSpace[A]
O u t [ ] =

{{2, - 3, 0, 1}, {1, - 2, 1, 0}}

I n [ ] : = (*iii*)
rank
O u t [ ] =

I n [ ] : = nullity
O u t [ ] =

I n [ ] : = Dimensions[A]〚2〛
O u t [ ] =

(*rank+nullity=dimension*)

I n [ ] : = (*02*)
A1 = {{4, 1, 0}, {0, 3, 0}, {0, 0, 2}};

I n [ ] : = eigenvalue = Eigenvalues[A1]
O u t [ ] =

{4, 3, 2}

I n [ ] : = D1 = DiagonalMatrix[eigenvalue]

O u t [ ] =

{{4, 0, 0}, {0, 3, 0}, {0, 0, 2}}

I n [ ] : = eigenvector = Eigenvectors[A1]
O u t [ ] =

{{1, 0, 0}, {- 1, 1, 0}, {0, 0, 1}}

I n [ ] : = P = Transpose[eigenvector]
O u t [ ] =

{{1, - 1, 0}, {0, 1, 0}, {0, 0, 1}}


2 assignment-04(new).nb

I n [ ] : = P.D1.Inverse[P]
O u t [ ] =

{{4, 1, 0}, {0, 3, 0}, {0, 0, 2}}

(*A1 is diagonalizable*)

I n [ ] : = MatrixForm[D1]
O u t [ ] / / M a t r i x F o r m =
4 0 0
0 3 0
0 0 2

I n [ ] : = MatrixForm[P]
O u t [ ] / / M a t r i x F o r m =
1 -1 0
0 1 0
0 0 1

(*03*)
(*i*)
T[f_] := D[f, x];

I n [ ] : = basis = {1, x, x ^ 2};

I n [ ] : = T[basis]
O u t [ ] =

{0, 1, 2 x}

I n [ ] : = rm = Transpose[{{0, 0, 0}, {1, 0, 0}, {0, 2, 0}}] // MatrixForm


O u t [ ] / / M a t r i x F o r m =
0 1 0
0 0 2
0 0 0

I n [ ] : = (*ii*)
Eigenvalues[rm]
Eigenvectors[rm] // MatrixForm
O u t [ ] =
0 1 0
Eigenvalues 0 0 2 
0 0 0
O u t [ ] / / M a t r i x F o r m =
0 1 0
Eigenvectors 0 0 2 
0 0 0

(*04*)

(*a*)

I n [ ] : = var = {x, y, z, t};


assignment-04(new).nb 3

I n [ ] : = cof = {{3, 4, 1, 2}, {5, 7, 1, 3}, {4, 5, 2, 1}, {7, 10, 1, 6}};

I n [ ] : = con = {9, 11, 8, 10};

I n [ ] : = detA3 = Det[cof];

I n [ ] : = If[detA3 ≠ 0, solcramer = Table[tem = cof;


tem〚All, i〛 = con;
Det[tem] / detA3, {i, 1, Length[var]}]]

I n [ ] : = (*no solution*)
cof1 = {{3, 4, 1, 2}, {5, 7, 1, 3}, {4, 5, 2, 1}, {7, 10, 1, 6}};

I n [ ] : = con1 = {9, 11, 8, 10};


Det[cof1]
O u t [ ] =

(*no solition*)

(*Inverse[cof1]*con1*)

I n [ ] : = (*b*)
augmented = Join[cof1, Transpose[{con1}], 2]

O u t [ ] =

{{3, 4, 1, 2, 9}, {5, 7, 1, 3, 11}, {4, 5, 2, 1, 8}, {7, 10, 1, 6, 10}}

I n [ ] : = RowReduce[augmented]
O u t [ ] =

{{1, 0, 3, 0, 0}, {0, 1, - 2, 0, 0}, {0, 0, 0, 1, 0}, {0, 0, 0, 0, 1}}

I n [ ] : = (*05*)
(*i*)
A2 = {{2, - 1, 0}, {- 1, 2, - 1}, {0, - 1, 2}};

I n [ ] : = i = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};

I n [ ] : = b = l*i
O u t [ ] =

{{l, 0, 0}, {0, l, 0}, {0, 0, l}}

I n [ ] : = Det[A2 - b]
O u t [ ] =

4 - 10 l + 6 l2 - l3

I n [ ] : = (*ii*)
Solve4 - 10 l + 6 l2 - l3  0, l
O u t [ ] =

{l  2}, l  2 - 2 , l  2 + 2 
4 assignment-04(new).nb

I n [ ] : = (*iii*)
4 * i - 10 * MatrixPower[A2, 1] + 6 * MatrixPower[A2, 2] - MatrixPower[A2, 3]
O u t [ ] =

{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}

I n [ ] : = (*iv*)
1
inverseofA2 = * (10 * i - 6 * MatrixPower[A2, 1] + MatrixPower[A2, 2])
4
O u t [ ] =
3 1 1 1 1 1 1 3
 , , ,  , 1, ,  , , 
4 2 4 2 2 4 2 4

I n [ ] : = (*v*)
eigen1 = Eigenvectors[A2]
O u t [ ] =

1, - 2 , 1, {- 1, 0, 1}, 1, 2 , 1

I n [ ] : = P3 = Transpose[eigen1]
O u t [ ] =

{1, - 1, 1}, - 2 , 0, 2 , {1, 1, 1}

I n [ ] : = (*vi*)
inv = Inverse[P3]
O u t [ ] =
1 1 1 1 1 1 1 1
 , - , , - , 0, ,  , , 
4 2 2 4 2 2 4 2 2 4

I n [ ] : = P3.inv
O u t [ ] =

{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}

I n [ ] : = (*vii*)
eigenv = Eigenvalues[A2]
O u t [ ] =

2 + 2 , 2, 2 - 2

I n [ ] : = D2 = DiagonalMatrix[eigenv]
O u t [ ] =

2 + 2 , 0, 0, {0, 2, 0}, 0, 0, 2 - 2 

I n [ ] : = Inverse[P3].A2.P3
O u t [ ] =

1 1 1 1 1 1
1 + - 2 - - , 0, 1 + + 2 - - ,
2 2 2 2 2 2
1 1 1 1 1 1
{0, 2, 0}, 1 - - 2 - + , 0, 1 - + 2 - + 
2 2 2 2 2 2
assignment-04(new).nb 5

(*elementary problem*)
(*00,0*)
(*i*)
A5 = {{4, 5, 2}, {5, 2, 3}, {2, 7, 4}};

I n [ ] : = Minors[A5]
O u t [ ] =

{{- 17, 2, 11}, {18, 12, 6}, {31, 14, - 13}}

I n [ ] : = cofector = Transpose[Inverse[A5] * Det[A5]]


O u t [ ] =

{{- 13, - 14, 31}, {- 6, 12, - 18}, {11, - 2, - 17}}

I n [ ] : = (*ii*)
Transpose[A5]
O u t [ ] =

{{4, 5, 2}, {5, 2, 7}, {2, 3, 4}}

I n [ ] : = (*iii*)
Dimensions[A5]
Det[A5]
Diagonal[A5]
Tr[A5]
O u t [ ] =

{3, 3}
O u t [ ] =

- 60
O u t [ ] =

{4, 2, 4}
O u t [ ] =

10

I n [ ] : = (*iv*)
Det[A5]
O u t [ ] =

- 60

I n [ ] : = Inverse[A5]
O u t [ ] =
13 1 11 7 1 1 31 3 17
 , ,- ,  ,- , , - , , 
60 10 60 30 5 30 60 10 60
6 assignment-04(new).nb

I n [ ] : = (*v*)
Eigenvalues[A5]
Eigenvectors[A5]
O u t [ ] =

 11.1… , -2.96… , 1.82… 

O u t [ ] =

 0.829… , 0.782… , 1,  0.537… , -1.15… , 1,  -0.595… , -0.141… , 1

I n [ ] : = (*vi*)
MatrixPower[A5, 3] + MatrixPower[A5, 2] + MatrixPower[A5, 1]
O u t [ ] =

{{511, 579, 379}, {491, 528, 365}, {599, 705, 467}}

I n [ ] : = (*00.1*)
A6 = {{4, 1, - 2}, {0, 3, 1}, {0, 0, 3}};

I n [ ] : = D4 = DiagonalMatrix[Eigenvalues[A6]]
O u t [ ] =

{{4, 0, 0}, {0, 3, 0}, {0, 0, 3}}

I n [ ] : = P4 = Transpose[Eigenvectors[A6]]

O u t [ ] =

{{1, - 1, 0}, {0, 1, 0}, {0, 0, 0}}

I n [ ] : = P4.D4.Inverse[P4]

I n [ ] : = (*not diagonalizable*)
JordanDecomposition[A6]
O u t [ ] =

{{{- 1, 1, 1}, {1, 0, 0}, {0, 1, 0}}, {{3, 1, 0}, {0, 3, 0}, {0, 0, 4}}}

You might also like