Understanding Matrix Operations: A/C vs. A\C, A./A, and More in MATLAB

  • MATLAB
  • Thread starter Physics_rocks
  • Start date
  • Tags
    Matrices
In summary, the conversation discusses using matrices in MATLAB and the difference between A/C and A\C. A./A is also mentioned, which is a way to divide elements in a matrix.
  • #1
Physics_rocks
12
0
Hi all ,

I'd like your help with some actions taken with matrices .
if A=[1 2 3 ; 4 5 6 ; 7 8 9 ] and C=[1 3 -1 ; 2 4 0 ; 6 0 1 ]

what is the difference between A/C and A\C ?
what does it mean A./A ? what is A. ? MATLAB doesn't give me an answer when I write A.

thanx
 
Physics news on Phys.org
  • #2
Think of A/C and A\C as more efficient ways of calculating A*inv(C) and inv(A)*C, respectively.

A. doesn't mean anything. It's ./ that means something. ./ means divide element by element. Adding the . to an operator means to do it element by element. For example A*A is matrix multiplication while A.*A means just multiply the corresponding elements.
 
  • #3


I am familiar with matrix operations and their importance in various fields of study. In regards to your question, A/C and A\C are both matrix division operations in MATLAB, but they have different meanings and results.

A/C represents the left division operation, also known as the mldivide operator. This operation is used to solve linear systems of equations, where C represents the coefficients of the equations and A represents the variables. The result of A/C is the solution to the linear system.

On the other hand, A\C represents the right division operation, also known as the mrdivide operator. This operation is used to solve linear systems of equations in a different way, where A represents the coefficients and C represents the variables. The result of A\C is the solution to the linear system in a different form.

Moving on to A./A, this operation represents element-wise division of matrix A by itself. This means that each element in A is divided by its corresponding element in A, resulting in a matrix of ones. This operation is useful in certain mathematical calculations and can also be used to check for equal elements within a matrix.

Lastly, A. is not a valid operation in MATLAB. The dot represents the element-wise operation, which can be used with various mathematical operations such as addition, subtraction, multiplication, and division. However, it cannot be used alone without a specific operation following it.

I hope this helps clarify the differences between A/C, A\C, and A./A in MATLAB. Keep exploring and experimenting with matrix operations to gain a better understanding of their applications in scientific research.
 

1. What is the difference between A/C and A\C in MATLAB?

In MATLAB, A/C and A\C are both used for solving matrix equations. However, the main difference between the two is the direction of division. A/C performs left division, where A is divided by C. On the other hand, A\C performs right division, where C is divided by A.

2. How do I perform element-wise division in MATLAB?

To perform element-wise division in MATLAB, the dot operator (.) is used. For example, if A and B are two matrices, A./B will divide each element in A by the corresponding element in B. This is different from regular matrix division, where the dimensions of the matrices must match.

3. What is the difference between A./A and A/A in MATLAB?

In MATLAB, A./A and A/A may seem like they perform the same operation, but they are actually different. A./A performs element-wise division, whereas A/A performs regular matrix division.

4. How can I solve a matrix equation in MATLAB?

To solve a matrix equation in MATLAB, you can use the \ (backslash) or / (slash) operators. The backslash operator performs matrix left division, while the slash operator performs matrix right division. These operators will give you the solution to the equation Ax = B, where A and B are matrices and x is the unknown variable.

5. Can I perform matrix operations on arrays with different dimensions in MATLAB?

No, MATLAB does not allow matrix operations on arrays with different dimensions. This is because the dimensions of the matrices must match for the operations to be performed. However, you can use the dot operator (.) for element-wise operations on arrays with different dimensions.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
345
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
553
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
116
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
Back
Top