A_mul_Bc
A_mul_Bc(A, B)
For matrices or vectors $A$ and $B$, calculates $Aâ‹…Bá´´$
Examples
julia> A = [1 2; 3 4];
julia> B = [2 0; 1 2];
julia> A_mul_Bc(A, B)
2×2 Array{Int64,2}:
4 4
10 12
-
Matrix multiplication:
julia> A = [1 2; 3 4]; julia> B = [2 0; 1 2]; julia> A_mul_Bc(A, B) 2×2 Array{Int64,2}: 4 4 10 12
This example calculates the matrix product of A and B, which is equal to A multiplied by the complex conjugate of B.
-
Vector multiplication:
julia> A = [1, 2]; julia> B = [3, 4]; julia> A_mul_Bc(A, B) 1×1 Array{Int64,2}: 11
Here, A and B are treated as vectors and their product is calculated.
- Complex matrix multiplication:
julia> A = [1+2im 2+3im; 3+4im 4+5im]; julia> B = [2-1im 0-2im; 1-3im 2-4im]; julia> A_mul_Bc(A, B) 2×2 Array{Complex{Int64},2}: 3-8im 2-9im 3-22im 10-29im
This example demonstrates the multiplication of complex matrices A and B.
Common mistake example:
julia> A = [1 2; 3 4];
julia> B = [1, 2];
julia> A_mul_Bc(A, B)
ERROR: MethodError: no method matching A_mul_Bc(::Array{Int64,2}, ::Array{Int64,1})
In this example, the mistake is passing a matrix and a vector to A_mul_Bc
function, which does not have a defined method for this combination. Ensure that the inputs to A_mul_Bc
are both matrices or both vectors to avoid such errors.
See Also
Ac_ldiv_B, Ac_ldiv_Bc, Ac_mul_B, Ac_mul_Bc, Ac_rdiv_B, Ac_rdiv_Bc, At_ldiv_B, At_ldiv_Bt, At_mul_B, At_mul_Bt, At_rdiv_B, At_rdiv_Bt, A_ldiv_Bc, A_ldiv_Bt, A_mul_B!, A_mul_Bc, A_mul_Bt, A_rdiv_Bc, A_rdiv_Bt, Bidiagonal, cond, conv2, det, diag, diagind, diagm, diff, eig, eigvals, eigvecs, expm, eye, full, inv, isdiag, ishermitian, isposdef, isposdef!, issym, istril, istriu, logabsdet, logdet, lyap, norm, qrfact, rank, repmat, rot180, rotl90, rotr90, sortrows, sqrtm, SymTridiagonal, trace, Tridiagonal, tril, tril!, triu, triu!, writedlm,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.