Data605-Assignment3
Hazal Gunduz
library(knitr)
knitr::include_graphics("/Users/otheraccount/Downloads/assignment3.png")
1. Problem Set 1
1.1: What is the rank of the matrix A?
A <- matrix(c(1,2,3,4,-1,0,1,3,0,1,-2,1,5,4,-2,-3), nrow = 4, ncol = 4, byrow = T)
A
## [,1] [,2] [,3] [,4]
## [1,] 1 2 3 4
## [2,] -1 0 1 3
## [3,] 0 1 -2 1
## [4,] 5 4 -2 -3
dim(A)
## [1] 4 4
As we see from above matrix, it’s dimension is (4x4) matrix, therefore it rank is 4.
1.2: Given an mxn matrix where m > n, what can be the maximum rank? The minimum rank, assuming that the matrix is non-zero?
Given m x n matrix where m > n the max rank of that matrix will be n, the rank of a matrix cannot be greater than the smallest dimension of the matrix. And assuming the matrix is non-zero, the minimum rank of this matrix will be 1.
1.3: What is the rank of matrix B?
B <- matrix(c(1,2,1,3,6,3,2,4,2), nrow = 3, ncol = 3, byrow = T)
B
## [,1] [,2] [,3]
## [1,] 1 2 1
## [2,] 3 6 3
## [3,] 2 4 2
det(B)
## [1] 0
The determinate of this matrix is 0. And at least one of the rows or columns is dependent one another. So row 2 = row 1 + row 3 and 2 x row 1 = row 3. The rank of this matrix is 1.
2. Problem set 2
Compute the eigenvalues and eigenvectors of the matrix A.You’ll need to show your work.You’ll need to write out the characteristic polynomial and show your solution.
Ax = \(\lambda\)x
det(A − I\(\lambda\)) = 0
(1 − \(\lambda\))((4 − \(\lambda\))(6 − \(\lambda\))) + 2(0 − 0) + 3(0 − 0) = 0
(1 − \(\lambda\))(4 − \(\lambda\))(6 − \(\lambda\)) − 0 + 0 = 0
(1 − \(\lambda\))(24 − 4\(\lambda\) − 6\(\lambda\) + \(\lambda^2\)) = 0
(1 - \(\lambda\))(24 − 10\(\lambda\) + \(\lambda^2\)) = 0
24−10\(\lambda\) + \(\lambda^2\) − 24\(\lambda\) + 10\(\lambda^2\) − \(\lambda^3\) = 0
−\(\lambda^3\) + 11\(\lambda^2\) − 34\(\lambda\) + 24 = 0
\(\lambda^3\) − 11\(\lambda^2\) + 34\(\lambda\) − 24 = 0
\(\lambda^2\)(\(\lambda\) − 11) + 2(17\(\lambda\) − 12) = 0
A <- matrix(c(1,2,3,0,4,5,0,0,6), nrow = 3, ncol = 3, byrow = T)
A
## [,1] [,2] [,3]
## [1,] 1 2 3
## [2,] 0 4 5
## [3,] 0 0 6
Eigen values and vectors:
eigen(A)
## eigen() decomposition
## $values
## [1] 6 4 1
##
## $vectors
## [,1] [,2] [,3]
## [1,] 0.5108407 0.5547002 1
## [2,] 0.7981886 0.8320503 0
## [3,] 0.3192754 0.0000000 0