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

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)\).

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

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

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

Generalize the idea of Exercise 21(a) [not 21(b)] by constructing a \(5 \times 5\) matrix \(M = \left[ {\begin{array}{*{20}{c}}A&0\\C&D\end{array}} \right]\) such that \({M^2} = I\). Make C a nonzero \(2 \times 3\) matrix. Show that your construction works.

Let \(A = \left( {\begin{aligned}{*{20}{c}}{\bf{2}}&{\bf{5}}\\{ - {\bf{3}}}&{\bf{1}}\end{aligned}} \right)\) and \(B = \left( {\begin{aligned}{*{20}{c}}{\bf{4}}&{ - {\bf{5}}}\\{\bf{3}}&k\end{aligned}} \right)\). What value(s) of \(k\), if any will make \(AB = BA\)?

Assume \(A - s{I_n}\) is invertible and view (8) as a system of two matrix equations. Solve the top equation for \({\bf{x}}\) and substitute into the bottom equation. The result is an equation of the form \(W\left( s \right){\bf{u}} = {\bf{y}}\), where \(W\left( s \right)\) is a matrix that depends upon \(s\). \(W\left( s \right)\) is called the transfer function of the system because it transforms the input \({\bf{u}}\) into the output \({\bf{y}}\). Find \(W\left( s \right)\) and describe how it is related to the partitioned system matrix on the left side of (8). See Exercise 15.

Suppose the third column of Bis the sum of the first two columns. What can you say about the third column of AB? Why?

In Exercises 1–9, assume that the matrices are partitioned conformably for block multiplication. Compute the products shown in Exercises 1–4.

4. \[\left[ {\begin{array}{*{20}{c}}I&0\\{ - X}&I\end{array}} \right]\left[ {\begin{array}{*{20}{c}}A&B\\C&D\end{array}} \right]\]

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