Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

A useful way to test new ideas in matrix algebra, or to make conjectures, is to make calculations with matrices selected at random. Checking a property for a few matrices does not prove that the property holds in general, but it makes the property more believable. Also, if the property is actually false, you may discover this when you make a few calculations.

36. Write the command(s) that will create a \(6 \times 4\) matrix with random entries. In what range of numbers do the entries lie? Tell how to create a \(3 \times 3\) matrix with random integer entries between \( - {\bf{9}}\) and 9. (Hint:If xis a random number such that 0 < x < 1, then \( - 9.5 < 19\left( {x - .5} \right) < 9.5\).

Short Answer

Expert verified

The command that will create a\(6 \times 4\)matrix with random entries is\( > > rand\left( {6,4} \right)\). The range of the entries is between 0 and 1.

The command \( > > round\left( {19*\left( {rand\left( {3,3} \right) - .5} \right)} \right)\) creates a \(3 \times 3\) matrix with random integer entries between \( - 9\) and 9.

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

Write the MATLAB commands

To create a matrix of the order\(m \times n\)with random entries, use the command\( > > rand\left( {m,n} \right)\), and distribute the entries between 0 and 1.

To create a matrix of the order\(m \times n\)with integer entries between\( - a < b\left( {x - c} \right) < a\), use the command\( > > round\left( {b*\left( {rand\left( {m,n} \right) - c} \right)} \right)\)and distribute the integer entries between\( - a\)and a.

02

Create a \(6 \times 4\) matrix with random entries

To create a matrix of the order\(6 \times 4\)with random entries, use the command in the MATLAB, as shown below:

\( > > rand\left( {6,4} \right)\)

The obtained random\(6 \times 4\)matrix is shown below:

\(\left( {\begin{aligned}{*{20}{c}}{0.78172}&{0.57396}&{0.54561}&{0.08579}\\{0.45554}&{0.76801}&{0.56704}&{0.91465}\\{0.44674}&{0.39120}&{0.15160}&{0.02506}\\{0.79187}&{0.83126}&{0.97255}&{0.05501}\\{0.47461}&{0.14454}&{0.44708}&{0.76701}\\{0.86106}&{0.45261}&{0.50968}&{0.08317}\end{aligned}} \right)\)

The entries of the matrix are in the interval\(\left( {0,1} \right)\).

Thus, the range of the entries lies between 0 and 1.

03

Create a \(3 \times 3\) matrix with random integers

To create a matrix of the order\(3 \times 3\)with random integers between\( - 9\)and 9, assume x as a random number represented as\(0 < x < 1\).

Then,\( - 9.5 < 19\left( {x - .5} \right) < 9.5\).

Use the command in the MATLAB as shown below:

\( > > round\left( {19*\left( {rand\left( {3,3} \right) - .5} \right)} \right)\)

Thus, the command is \( > > round\left( {19*\left( {rand\left( {3,3} \right) - .5} \right)} \right)\).

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

a. Verify that \({A^2} = I\) when \(A = \left[ {\begin{array}{*{20}{c}}1&0\\3&{ - 1}\end{array}} \right]\).

b. Use partitioned matrices to show that \({M^2} = I\) when\(M = \left[ {\begin{array}{*{20}{c}}1&0&0&0\\3&{ - 1}&0&0\\1&0&{ - 1}&0\\0&1&{ - 3}&1\end{array}} \right]\).

Prove Theorem 2(d). (Hint: The \(\left( {i,j} \right)\)- entry in \(\left( {rA} \right)B\) is \(\left( {r{a_{i1}}} \right){b_{1j}} + ... + \left( {r{a_{in}}} \right){b_{nj}}\).)

In exercise 5 and 6, compute the product \(AB\) in two ways: (a) by the definition, where \(A{b_{\bf{1}}}\) and \(A{b_{\bf{2}}}\) are computed separately, and (b) by the row-column rule for computing \(AB\).

\(A = \left( {\begin{aligned}{*{20}{c}}{ - {\bf{1}}}&{\bf{2}}\\{\bf{5}}&{\bf{4}}\\{\bf{2}}&{ - {\bf{3}}}\end{aligned}} \right)\), \(B = \left( {\begin{aligned}{*{20}{c}}{\bf{3}}&{ - {\bf{2}}}\\{ - {\bf{2}}}&{\bf{1}}\end{aligned}} \right)\)

Let \(X\) be \(m \times n\) data matrix such that \({X^T}X\) is invertible., and let \(M = {I_m} - X{\left( {{X^T}X} \right)^{ - {\bf{1}}}}{X^T}\). Add a column \({x_{\bf{0}}}\) to the data and form

\(W = \left[ {\begin{array}{*{20}{c}}X&{{x_{\bf{0}}}}\end{array}} \right]\)

Compute \({W^T}W\). The \(\left( {{\bf{1}},{\bf{1}}} \right)\) entry is \({X^T}X\). Show that the Schur complement (Exercise 15) of \({X^T}X\) can be written in the form \({\bf{x}}_{\bf{0}}^TM{{\bf{x}}_{\bf{0}}}\). It can be shown that the quantity \({\left( {{\bf{x}}_{\bf{0}}^TM{{\bf{x}}_{\bf{0}}}} \right)^{ - {\bf{1}}}}\) is the \(\left( {{\bf{2}},{\bf{2}}} \right)\)-entry in \({\left( {{W^T}W} \right)^{ - {\bf{1}}}}\). This entry has a useful statistical interpretation, under appropriate hypotheses.

In the study of engineering control of physical systems, a standard set of differential equations is transformed by Laplace transforms into the following system of linear equations:

\(\left[ {\begin{array}{*{20}{c}}{A - s{I_n}}&B\\C&{{I_m}}\end{array}} \right]\left[ {\begin{array}{*{20}{c}}{\bf{x}}\\{\bf{u}}\end{array}} \right] = \left[ {\begin{array}{*{20}{c}}{\bf{0}}\\{\bf{y}}\end{array}} \right]\)

Where \(A\) is \(n \times n\), \(B\) is \(n \times m\), \(C\) is \(m \times n\), and \(s\) is a variable. The vector \({\bf{u}}\) in \({\mathbb{R}^m}\) is the “input” to the system, \({\bf{y}}\) in \({\mathbb{R}^m}\) is the “output” and \({\bf{x}}\) in \({\mathbb{R}^n}\) is the “state” vector. (Actually, the vectors \({\bf{x}}\), \({\bf{u}}\) and \({\bf{v}}\) are functions of \(s\), but we suppress this fact because it does not affect the algebraic calculations in Exercises 19 and 20.)

If Ais an \(n \times n\) matrix and the transformation \({\bf{x}}| \to A{\bf{x}}\) is one-to-one, what else can you say about this transformation? Justify your answer.

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free