Check if a matrix is diagonalizable in R Programming Language

0 votes

I've created a matrix and I would like to know if it is diagonalizable. How is this done in the R programming language?

Dec 24, 2018 in Data Analytics by Sophie may
• 9,850 points
40 views

1 answer to this question.

0 votes

On a given matrix, a, the first way is to take the eigen vectors times the diagonal of the eigen values times the inverse of the original matrix. That should give us back the original matrix. In R that looks like:

a <- matrix( c(1:16), nrow = 4)
p <- eigen(m)$vectors
d <- diag(eigen(a)$values)
p %*% d %*% solve(p)
a

so in that example p %*% d %*% solve(p) should be the same as a

answered Dec 24, 2018 by Tyrion anex
• 8,270 points

Related Questions In Data Analytics

0 votes
1 answer

Check if the object(variable) is defined in R

You can use the exists(): > exists("toFindUnknown") [1] FALSE > ...READ MORE

answered Apr 17, 2018 in Data Analytics by darklord
• 6,170 points
53 views
0 votes
2 answers

What are the rules to define a variable name in R programming language?

The same rules almost follow for all ...READ MORE

answered Aug 26 in Data Analytics by anonymous
• 28,040 points
97 views
0 votes
1 answer

How to check if object is defines in R?

You can use the exists function for ...READ MORE

answered Nov 6, 2018 in Data Analytics by Kalgi
• 41,660 points
31 views
0 votes
1 answer

Can we have an if loop inside a for loop in R programming?

You're If loop doesn't have any condition ...READ MORE

answered Dec 21, 2018 in Data Analytics by Sophie may
• 9,850 points
47 views
0 votes
1 answer

Modular programming in R language

R provides support to create subscripts. For ex. ...READ MORE

answered Jan 31 in Data Analytics by Tyrion anex
• 8,270 points
24 views
0 votes
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21 in Data Analytics by anonymous
• 28,040 points
131 views
0 votes
1 answer

How can I perform word stemming in R

The tm package in R provides the stemDocument() function to stem the ...READ MORE

answered Aug 20, 2018 in Data Analytics by Anmol
• 3,620 points
66 views
0 votes
1 answer

How to know the type of an object?

To find the type of an object ...READ MORE

answered Sep 19, 2018 in Data Analytics by Anmol
• 3,620 points
36 views
0 votes
2 answers
0 votes
2 answers

R Programming error in if condition

Hi. Instead of breaking the line add it ...READ MORE

answered Aug 26 in Data Analytics by anonymous
• 28,040 points
59 views