Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Algebra class we learn about matrices. We learn to add, subtract, and multiply 2x2 matrices and 3x3 matrices. Below are some examples from Algebra

In Algebra class we learn about matrices. We learn to add, subtract, and multiply 2x2 matrices and 3x3 matrices. Below are some examples from Algebra class with the answers:

image text in transcribed+image text in transcribed=image text in transcribed

image text in transcribed-image text in transcribed=image text in transcribed

image text in transcribed*image text in transcribed=image text in transcribed

It is almost apparent how to add. We add the first position in the first matrix with the first position in the second matrix. We continue with the corresponding positions to get the answer. Subtraction follows this same positional methods. Multiplication of matrices appears to be confusing since it does not follow the positional method used in addition and subtraction.

The answer is achieved by taking the row from the first matrix and the column from the second matrix and multiplying the respective values and then taking the sum of the products.

The answer above was achieve as follows:

3(1)+4(-2)=-5 3(0)+4(3)=12

5(1)+6(-2)=-7 5(0)+6(3)=18

Write a program that take in two matrices and then allow the user to choose to add, subtract, or multiply them and display the answer. The program will display the following menu:

A. Enter Matrix A

B. Enter Matrix B

C. Display A + B

D. Display A - B

E. Display A * B

F. Exit

The program should loop and allow the user to continue to choose different options until they choose quit. The well written program will modularize the process into different methods.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

2. First-mover advantage is simply wrong. Best beats first.

Answered: 1 week ago

Question

=+How do you calculate the present value of a mixed stream?

Answered: 1 week ago