Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This set of exercises will help you to learn and test your skill in matrix operations, starting with basic ones like scalar multiplication all the way through eigenvalue and eigenvectors. Before proceeding, it might be helpful to look over the help pages for the `diag`, `t`, `eigen`, and `crossprod` functions. If you want further documentation also consider chapter 5.7 from “An Introduction to R”.

Answers to the exercises are available here.

If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment.

Exercise 1

Consider `A=matrix(c(2,0,1,3), ncol=2)` and `B=matrix(c(5,2,4,-1), ncol=2).`
a) Find A + B
b) Find A B

Exercise 2

Scalar multiplication. Find the solution for aA where `a=3` and A is the same as in the previous question.

Exercise 3

Using the the `diag ` function build a diagonal matrix of size 4 with the following values in the diagonal 4,1,2,3.

Exercise 4

Find the solution for Ab, where A is the same as in the previous question and `b=c(7,4).`

Exercise 5

Find the solution for AB, where B is the same as in question 1.

Exercise 6

Find the transpose matrix of A.

Exercise 7

Find the inverse matrix of A.

Exercise 8

Find the value of x on Ax=b.

Exercise 9

Using the function ` eigen ` find the eigenvalue for A.

Exercise 10

Find the eigenvalues and eigenvectors of A’A . Hint: Use` crossprod` to compute A’A .
The text passage is a set of exercises for matrix operations in R, with each exercise presenting a mathematical question or task to be performed.
multiple_questions
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

This set of exercises will help you to learn and test your skill in matrix operations, starting with basic ones like scalar multiplication all the way through eigenvalue and eigenvectors. Before proceeding, it might be helpful to look over the help pages for the `diag`, `t`, `eigen`, and `crossprod` functions. If you want further documentation also consider chapter 5.7 from “An Introduction to R”.

Answers to the exercises are available here.

If you obtained a different (correct) answer than those listed on the solutions page, please feel free to post your answer as a comment.

Exercise 1

Consider `A=matrix(c(2,0,1,3), ncol=2)` and `B=matrix(c(5,2,4,-1), ncol=2).`
a) Find A + B
b) Find A B

Exercise 2

Scalar multiplication. Find the solution for aA where `a=3` and A is the same as in the previous question.

Exercise 3

Using the the `diag ` function build a diagonal matrix of size 4 with the following values in the diagonal 4,1,2,3.

Exercise 4

Find the solution for Ab, where A is the same as in the previous question and `b=c(7,4).`

Exercise 5

Find the solution for AB, where B is the same as in question 1.

Exercise 6

Find the transpose matrix of A.

Exercise 7

Find the inverse matrix of A.

Exercise 8

Find the value of x on Ax=b.

Exercise 9

Using the function ` eigen ` find the eigenvalue for A.

Exercise 10

Find the eigenvalues and eigenvectors of A’A . Hint: Use` crossprod` to compute A’A .
user
The text passage is a set of exercises for matrix operations in R, with each exercise presenting a mathematical question or task to be performed.

TYPE: MULTIPLE_QUESTIONS