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,530 points
26 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,280 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,140 points
39 views
0 votes
1 answer

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

A variable name in R programming language ...READ MORE

answered Sep 7, 2018 in Data Analytics by zombie
• 3,690 points
78 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
• 39,270 points
23 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,530 points
42 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,280 points
19 views
0 votes
1 answer

How to sort a data frame by columns in R?

You can just use the order function ...READ MORE

answered Apr 10, 2018 in Data Analytics by darklord
• 6,140 points
89 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
46 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
30 views
0 votes
2 answers

How to change the value of a variable using R programming in a data frame?

You are getting this error since the ...READ MORE

answered 4 days ago in Data Analytics by anonymous
• 20,110 points
115 views
0 votes
1 answer

R Programming error in if condition

There's a small mistake in your syntax. This ...READ MORE

answered Jan 18 in Data Analytics by Tyrion anex
• 8,280 points
53 views