A_mul_Bt

A_mul_Bt(A, B)

For matrices or vectors \$A\$ and \$B\$, calculates \$Aâ‹…Báµ€\$

Examples

``````julia> A = [1 2 3; 4 5 6];
B = [7 8; 9 10; 11 12];

julia> A_mul_Bt(A, B)
2×2 Array{Int64,2}:
58   64
139  154``````
1. Multiply a matrix with a transposed matrix:

``````julia> A = [1 2 3; 4 5 6];
julia> B = [7 8; 9 10; 11 12];
julia> A_mul_Bt(A, B)
2×2 Array{Int64,2}:
58   64
139  154``````

This example multiplies matrix `A` with the transpose of matrix `B`.

2. Multiply a vector with a transposed matrix:

``````julia> A = [1, 2, 3];
julia> B = [4 5 6];
julia> A_mul_Bt(A, B)
1×1 Array{Int64,2}:
32``````

It calculates the dot product of vector `A` with the transpose of matrix `B`.

3. Multiply a row vector with a column vector:
``````julia> A = [1 2 3];
julia> B = [4, 5, 6];
julia> A_mul_Bt(A, B)
1×1 Array{Int64,2}:
32``````

This example demonstrates the multiplication of a row vector (`A`) with a column vector (`B`).

Common mistake example:

``````julia> A = [1 2 3; 4 5 6];
julia> B = [7 8 9];
julia> A_mul_Bt(A, B)
ERROR: DimensionMismatch("A has dimensions (2,3) but B has dimensions (1,3)")``````

In this case, the dimensions of matrix `A` and matrix `B` are incompatible for multiplication. Make sure the number of columns in `A` matches the number of columns in the transposed `B` for a valid multiplication.